Jump to content

Search the Community

Showing results for tags 'tables'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome
    • Start Here!
    • News
  • Software-Related Talk
    • Documentation
    • Getting Started
    • The JavaScript Library
    • FusionPro® VDP Creator
    • FusionPro® VDP Producer
    • FusionPro® VDP Server (API)
    • FusionPro® Expression®
    • MarcomCentral®
  • Support
    • Issues, Questions, Etc.
    • Digital Workflow Documents
    • Fonts
  • Off Topic
    • Customer Polls
    • Job Board (Moderated)
    • Reviews, Rants, and General Musings

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Location


Occupation


FusionPro VDP software version


OS


Acrobat Version


Homepage


ICQ


AIM


Yahoo


MSN


Skype


User Title

Found 6 results

  1. Hello, I have a table that contains data for anywhere from 1-6 rows that I have successfully set up in Fusion. However, when the additional rows are empty, I need the document to remove the extra empty rows. For example, if a record only contains 3 rows of values, I need the additional 3 rows of the table to hide so that the borders/grids from the table do not populate.
  2. The JavaScript table object in FusionPro 7.0, new FPTable, must be declared at the beginning of a table, followed by the number of columns that the table will use. Columns are defined in 100ths of a point. The example below shows 4 columns that are each an inch wide. The number of rows can be added row by row, or at the beginning of the table. new FPTable; var myTable = new FPTable; myTable.AddColumns(7200, 7200, 7200, 7200); myTable.AddRows(2); At the end of the table, the MakeTags() function must be called: return myTable.MakeTags(); There are 2 ways to set content for the cells. The first row and column in a table is always 0. Text Fields, static type or even graphic images can be placed inside a cell: myTable.Rows[0].Cells[0].Content = "Hello"; myTable.Rows[0].Cells[1].Content = Field("FName"); myTable.Rows[0].Cells[2].Content = "Goodbye"; myTable.Rows[0].Cells[3].Content = Field("LName"); The second way is can also set the content of all the cells in an entire row like this: myTable.Rows[1].SetContents("Hi", Field("FName"), "Bye", Field("LName")); It is possible to copy content and formatting from one cell to another in a row. In the example below, the content is set into cell 2,0 and then copied into cells 2,1 / 2,2 / 2,3. myTable.Rows[2].Cells[0].Content = "Bon Jour"; myTable.Rows[2].CopyCells(0, 1,2,3); In this example, thin Black borders are applied to cell 0,0 and then copied to cells 0,1 / 0,2 / 0,3. myTable.Rows[0].Cells[0].SetBorders("Thin", "Black", "Top", "Bottom", "Right", "Left"); myTable.Rows[0].CopyCells(0, 1,2,3); When copying the formatting of one cell to another, it is important to remember to set the content of the subsequent cells after the formatting is done (unless the content is also meant to be the same). The following pages show more examples of ways to format a cell. Shading: Two properties for Shading are Shade Color and Shade Percent. myTable.Rows[1].Cells[0].ShadeColor="Black"; myTable.Rows[1].Cells[0].ShadePct=20; There are two more properties for Shading which are Shading Repeat and Shading Type. This allows you to specify 2 (or more) different shading values so that you can alternate shading between rows or columns. The two properties for Shading Type are "ByRow" or "ByColumn". myTable.ShadingColor1 = "Blue"; myTable.ShadingPct1 = 20; myTable.ShadingRepeat1 = 1; myTable.ShadingColor2 = "Red"; myTable.ShadingPct2 = 40; myTable.ShadingRepeat2 = 1; myTable.ShadingType = "ByRow"; //or "ByColumn" SetBorders: The 2 border properties include thickness and location. Values for thickness are "Thin", "Medium," "Thick" and "None". If no parameter is specified, the border will default to none. Values for location are "Top," "Bottom," "Right" and "Left". myTable.Rows[0].Cells[0].SetBorders("Thin", "Black", "Top", "Bottom); Font Formatting: The 3 properties for font formatting are Font Face, Text Color and Point Size. myTable.Rows[2].Cells[0].Font="Times New Roman"; myTable.Rows[2].Cells[0].TextColor="Red"; myTable.Rows[2].Cells[0].PointSize=15; Bold/Italics: Below is an example of how to apply Bold and Italic formatting to text in a cell: myTable.Rows[2].Cells[0].Bold="On"; myTable.Rows[2].Cells[0].Italic="On"; Margins: To use table margins, the new FPTableMargins object must be declared. Once the new FPTableMargins object is called, the 4 parameters that can be used are Top, Bottom, Left and Right. The margins for top and bottom are called out in 10ths of a point. For left and right they are called out in 100ths of a point myTable.Rows[2].Cells[0].Margins = new FPTableMargins; myTable.Rows[2].Cells[0].Margins.Top = 50; myTable.Rows[2].Cells[0].Margins.Bottom = 50; Rotation: The contents of a cell can be rotated by using the rotation property. Valid values for rotation are 0, 90, 180, or 270. myTable.Rows[3].Cells[0].Rotate = 90; To combine or merge cells together, HStraddle and VStraddle can be used to straddle cells both Horizontally and Vertically: myTable.Rows[3].Cells[0].HStraddle = 2; myTable.Rows[3].Cells[2].VStraddle = 2; To align content within cells horizontally, the HAlign property can be used with the values of "Left", "Right" and "Center": myTable.Rows[3].Cells[0].HAlign = "Left"; myTable.Rows[3].Cells[1].HAlign = "Right"; myTable.Rows[3].Cells[2].HAlign = "Center"; To align content within cells vertically, the VAlign property can be used with the values of "Top", "Bottom" and "Middle": myTable.Rows[3].Cells[0].VAlign = "Top"; myTable.Rows[3].Cells[1].VAlign = "Bottom"; myTable.Rows[3].Cells[2].VAlign = "Middle"; Advanced Settings: It is possible to specify a row in a table to be a header type and a footer type. When a row is specified as a header or footer, it will repeat on overflow pages. myTable.Rows[0].Type = "Header"; myTable.Rows[4].Type = "Footer"; There is also a way to skip a row in a table if needed. This could be based on some conditional logic. myTable.Rows[0].Type = "Skip"; //removes the row from the table Below is a sample table rule (containing 2 text fields for first and last name) and the resulting output: var myTable = new FPTable; myTable.AddColumns(7200, 7200, 7200, 7200); myTable.AddRows(3); myTable.Rows[0].Cells[0].Font="Times New Roman"; myTable.Rows[0].Cells[0].TextColor="Red"; myTable.Rows[0].Cells[0].SetBorders("Thin", "Black", "Top", "Bottom", "Right", "Left"); myTable.Rows[0].CopyCells(0, 1,2,3); myTable.Rows[0].Cells[0].Content = "Hello"; myTable.Rows[0].Cells[1].Content = Field("FName"); myTable.Rows[0].Cells[2].Content = "Goodbye"; myTable.Rows[0].Cells[3].Content = Field("LName"); myTable.Rows[1].Cells[0].Font="Arial"; myTable.Rows[1].Cells[0].TextColor="Blue"; myTable.Rows[1].Cells[0].SetBorders("Thin", "Black", "Top", "Bottom", "Right", "Left"); myTable.Rows[1].CopyCells(0, 1,2,3); myTable.Rows[1].SetContents( "Hola", Field("FName"), "Adios", Field("LName")); myTable.Rows[2].Cells[0].Font="Times New Roman"; myTable.Rows[2].Cells[0].TextColor="Green"; myTable.Rows[2].Cells[0].SetBorders("Thin", "Black", "Top", "Bottom", "Right", "Left"); myTable.Rows[2].CopyCells(0, 1,2,3); myTable.Rows[2].SetContents( "This", "Row", "is", "Green"); return myTable.MakeTags(); http://forums.printable.com/attachment.php?attachmentid=417&stc=1&d=1301344348 PDF version of this document
  3. Hi All, I have attached a PDF that i need to convert all of the text to VDP fields. I need help in creating a template for this on EFI Digital Storefront so customers can order this. Is there a way i can create this template so FusionPro displays the fields in the similar structure on DSF while filling the fields out. Hope this makes sense. I work if FusionPro 9.3 Creator Thanking you in advance. Naval VDP Field template.pdf
  4. My reporting form has been modified this year and I was trying out some new code that was a lot more condensed than my previous code. However, it seems that the data table does not create a new one for each property but makes doubles and extras of the first table. Can someone look at the code and forms and see what I missed? I thought it had to do with clearing the data array but I can't figure out where I am running into trouble (probably because I have been staring at this code for weeks now). Any help would be greatly appreciated! //Link to the external data file. //The '\t' is used to indicate TAB delimited data in this external data file data = new ExternalDataFileEx("property.txt", "\t"); if (!data.valid) { ReportError("Cannot successfully read/find the external data file."); } // Create empty var tables = []; var tbl = []; //Get a count of the total number of records in the external data file NumberOfRecords = data.recordCount; var type = [ ['Horses', 'Horses, Mules and Asses (ponies, donkeys, burros)*', 5.85], ['Cattle','Cattle (cows, bulls, yearlings)*', 2.29], ['Bison','Domestic Bison*', 6.38], ['Sheep','Sheep*', 0.54], ['Swine','Swine (report all swine three months of age or older)', 0.78], ['Goats','Goats*', 0.54], ['Poultry','Poultry (chickens, turkeys, geese, ducks and other domestic birds raised as food or to produce feathers)', 0.05], ['Bees','Bees (number of hives or boards)', 0.41], ['Domestic','Alternative Livestock (privately owned caribou, mule deer, whitetail deer, elk, moose, antelope, mountain sheep, mountain goats indigenous to Montana)*', 26.23], ['Ratites','Ratites (ostriches, rheas, emus)*', 9.37], ['Llamas','Llamas and Alpacas*' , 9.37] ]; //Now, loop through all records in the external data file and find the records that belong to the customer. for (var n = 1; n <= NumberOfRecords; n++) { function ExField(field) { return data.GetFieldValue(n, field); } if (ExField("CID") == Field("Customer ID")) { //Create Table var myTable = new FPTable; myTable.AddColumns(26500, 5800, 7500, 10800); tbl.push(["County: " + ExField("County Name"), "Property ID: " + ExField("Property ID"), "", ""]); // Title tbl.push(["Livestock Type", "A <br> Count", "B <br> Fee Amount", "C <br> Calculate Total"]); // Header type.forEach(function(s) { var [field, description, price] = s; field = ExField(field); description = "<leading newsize = 120>" + description; price = " x " + FormatNumber('$00.00', price).replace('$0','$ ')+ " = "; tbl.push([description, '', price,'']); }); // Footer tbl.push(["Add amounts in column C. <br><b>This is your total Per Capita Fee Amount due for this county.</b>", "", "", "<b>$</b>"]); // Formatting for (var i=0; i<tbl.length; i++) { var row = myTable.AddRow(); var cell = row.Cells[0]; cell.PointSize = 11; cell.Margins = new FPTableMargins; cell.Margins = {Bottom: 10, Top: 23, Left: 250, Right: 250}; row.CopyCells (0,1,2,3); row.minHeight = 1500; myTable.ShadingColor1 = 'White'; myTable.ShadingPct1 = 100; myTable.ShadingRepeat1 = 1; myTable.ShadingColor2 = 'Black 9%'; myTable.ShadingPct2 = 100; myTable.ShadingRepeat2 = 1; myTable.ShadingType = 'ByRow'; //or “ByColumn” if (i == 0) { cell.VAlign = 'Bottom'; cell.Bold = 'On'; } if (i == 1) { cell.PointSize = 10; cell.ShadeColor = "Brown"; cell.ShadePct = 100; cell.TextColor = "White"; cell.HAlign = "Center"; cell.Bold = 'On'; cell.SetBorders("Thin", "Black 25%","Top", "Bottom", "Right", "Left"); row.minHeight = 3000; row.CopyCells (0,1,2,3); } if (i > 1) { cell.Bold = 'Off'; cell.SetBorders("Thin", "Black 25%","Top", "Bottom", "Right", "Left"); cell.HAlign = "Left"; row.minHeight = 1500; row.CopyCells (0,1,2,3); } if (i == 13) { cell.PointSize = 10; cell.HStraddle = 3; cell.HAlign = "Right"; } cell.VAlign = 'Middle'; row.CopyCells (0,1,2,3); //Assign the content var [col1,col2,col3,col4] = tbl[i]; row.SetContents(col1,col2,col3,col4); } myTable.Rows[0].Cells[1].HStraddle = 3; myTable.Rows[13].Cells[3].HAlign = "Left"; // Push variable into Array tables.push(myTable.MakeTags()); } } return tables.join('<br>'); Reporting Form 2017.zip
  5. I'm trying to recreate a product (see attachment below), the way it works is, there is a total of 14 fields that can be filled. The user is prompted to choose a number of services (1 to 14) they can then fill out the title description and rate. I initially thought I could possibly accomplish this by using the FPTables scripts to create a dynamic table that would populate the rows...dynamically based on the selected amount of services, but not really sure where to start. Could anyone tell me if this would be the best way to accomplish this and how, or is there some built ins. As a side note I'm using the Marcomcentral platform. Any help is greatly appreciated http://forums.pti.com/attachment.php?attachmentid=1342&d=1444767266
  6. I have a letterhead that has three columns. Each column can vary in length. And there are verticle bars in between each column at set distances. gray lines should move depending on length of text content should be vertically centered lines of content should not break or be indented gray line height and weight should not change each area can have up to 4 lines of content .085” between line and start of text block .15” between end of text and line I have attached a sample with three different examples. I am assuming need to use tables. And graphics for the vertical grey lines. I have created Text resources for each column of text: Column1_Res: «Dept1» «Dept2» «Dept3» «Dept4» Column2_Res: «Building» «Street1» «Street2» «CityStateZip» Column3_Res: «Phone1» «Phone2» «Phone3» «Phone4» I have created graphic files for the Grey vertical bars: 1VertBar_Left.jpg 2VertBar_Cent.jpg 3VertBar_Right.jpg Can anyone help me. I am not very proficient with tables. I have searched the forum for help, but I don't understand tables enough to take what has been posted and turn it into something I can use. Thanks in advance! Chris Boehm FusionPro Desktop 7.2P1k Adobe Acrobat Pro 10.1.2 Mac OS X 10.6.8 test example.pdf
×
×
  • Create New...