Jump to content

Search the Community

Showing results for tags 'data'.

  • 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 5 results

  1. 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
  2. Hi, I'm trying to set up a rule for a two-language (double-sided) marketing letter, and I'm running into difficulty setting up the salutation. One side of the letter is in German and the other is in French. My data is in German but I need to remove the German words from the Name field for the salutation on the French side of the letter. Also, some of the records have a generic salutation and others are personalized with the customer's name. Below is the rule I have so far: if (Field("SALUT") == "Sehr geehrte Damen und Herren") { return "<span>" + RawText("Chère Madame cher Monsieur") + "</span>"; } if (Field("SALUT").indexOf("Frau") > -1) { return "<span>" + RawText("Chère") + RawText(" ") + (Field("NAME") + "</span>"); } if (Field("SALUT").indexOf("Herr") > -1) { return "<span>" + RawText("Cher") + RawText(" ") + (Field("NAME") + "</span>"); } else { return "<span>" + RawText("Chère Madame cher Monsieur") + "</span>"; } return ""; The first part of the rule addresses the generic records, "Sehr geehrte Damen und Herren" being the generic German salutation and "Chère Madame cher Monsieur" being the generic French salutation. The 2nd and 3rd if statements address whether to use the feminine or masculine version of the French salutation. "Chère" being the feminine and "Cher" being the masculine. All is working fine until we get to the part where we add the Name field. All of the names are listed the way we address German customers. Examples: "Frau Alexandra Roth" (feminine) "Herrn Roger Brand" (masculine) The customer's names are actually Alexandra Roth and Roger Brand. I need to remove the "Frau" and the "Herrn" from the returned text. The end result needs to be "Chère Alexandra Roth" and "Cher Roger Brand" instead of "Chère Frau Alexandra Roth" and "Cher Herrn Roger Brand." Any help would be greatly appreciated. Thank you
  3. I have a very complex file. Figured out how to get it to loop through entries and then display additional data tables if it found another User. However, each user needs a copy of their own page, not just a data table, with all of the same information and it needs to flow behind the other one. I am not sure what I need to make this happen. Attaching a sample set so everyone can view what I have already and work through solutions. Sample FPro.zip
  4. ==================== [uPDATE] January 14, 2016 ==================== Solution has been found (by Step) and a cleaner code was also provided. I am leaving this thread as it is so others can get help with similar problems. Attachments have been removed. ===================== [ORIGINAL] January 13, 2016 ===================== We have a request to merge one user's letter with their property tables. These tables will vary in quantity per user. Currently I am able to populate the data tables and create an overflow. However, it seems that the first letter for "Johnny" works out and he gets what he is supposed to have. Then the second letter for "Beth" ends up with Johnny's table and both of her tables. The problem continues on from there. I believe it has to do with the array the data is being stored into and how we are calling it to run. Can someone look over the code and see how I get the tables to stay with their owners and not continue on to the next owner? Since the form is for our state government I will be unable to post the original for download. However, I have attached a sample build and test resources used to build the item. Please keep in mind that this is a very large mailing. If there is an issue with memory recall on larger items let me know.
  5. So I am attempting to create Data matrix barcodes. I need the code to have four fields from a spreadsheet in each code, with a comma between each piece of data. An example of the code to be encode would be "2,25,62076,3" without the quotes of course... Each of these values are being pulled from a different field (column) and the comma does not exist in the csv file. Any help would be greatly appreciated.
×
×
  • Create New...