Jump to content

step

Registered Users - Approved
  • Posts

    962
  • Joined

Everything posted by step

  1. What you're asking sounds like a question that is specific to MarcomCentral. Under that assumption, posting your question to that forum would give you more useful suggestions. That being said, the issue you're going to run into is with imposition. I'm assuming that MarcomCentral templates have a single imposition (FPI file) applied to them just like off-line FP templates do. The reason that's a problem is: within the FPI file, you'll have to specify the number of pages each record should have – i.e. duplex records will have 2 pages and simplex records will have 1 page. You can either: Set your imposition file up to be duplex and have a "blank" back page for simplex files Set your imposition file up to be simplex and then repeat each record twice for duplex files – returning the first page on the first repeat and the second page on the second repeat by putting this in your OnRecordStart rule: [color="red"]var card = CreateResource("bc.pdf",'graphic'); // Your uploaded resource[/color] FusionPro.Composition.repeatRecordCount = card.countPages card.pagenumber= FusionPro.Composition.repeatRecordNumber; FindGraphicFrame("[color="Red"]YOUR GRAPHIC FRAME NAME HERE[/color]").SetGraphic(card);
  2. You need to ensure that "Treat returned strings as tagged text" is checked in your rule editor. That will resolve the issue of tags (<br>) showing up in the preview. Have you defined the color within FusionPro (FusionPro > Advanced > Colors)? Is the color defined as "PANTONE 201" or "PANTONE 201 C"? You need to make sure your code is referencing the color by the name you have defined within FusionPro. You can also define the color within the rule itself like so: new FusionProColor('PANTONE 201 C', 0, 100, 100,0) The above would result in "PANTONE 201 C" having a build of 0/100/100/0 (C/M/Y/K respectively). So it sounds like you don't care as much about adding a break when there are 4 numbers, but what you really want to do is to put the "Toll-Free" number on its own line when there's more than one other number being used while restricting the first line to only 2 numbers. To do that, you can modify Dan's code to this: var numbers = { Office: Rule("Office Rule"), Cell: Rule("Cell Rule"), Fax: Rule("Fax Rule"), "Toll-Free": Rule("Toll-FreeRule"), }; var result = []; for (var label in numbers) if (numbers[label]) result.push(label + ": " + numbers[label]); var delim = '<color name = "PANTONE 201 C"> • </color>'; if ([color="Red"]result.length > 2 && numbers['Toll-Free'][/color]) return [color="red"]result.splice(0,2).join(delim) + '<br>' + result.join(delim)[/color]; //else return result.join(delim); Since the length of the 'result' array hinges on whether or not the results of your phone number rules are actually empty or not, you'll need to make sure that they are returning empty strings when the field is empty.
  3. Okay? I'm not sure how that's a problem. You can still do what I suggested and have your "pad" page return a serialized number (like the record number).
  4. One thing you could do is to have a 1 page per record imposition and repeat the first record every 25 records – so record 1 uses the 'cover' page on its first repeat and uses the 'pad' page on its second repeat: if (cover = FusionPro.Composition.inputRecordNumber % 25 == 1) FusionPro.Composition.repeatRecordCount = 2; var page = (cover && FusionPro.Composition.repeatRecordNumber == 1) ? 'cover' : 'pad'; FusionPro.Composition.SetBodyPageUsage(page,true);
  5. Can you be more specific about your issue? The Copyfit function reports that error when the text it's trying to fit into a text flow will not fit given the defined parameters (max and mins of pointsize and magnification). So with that in mind, it doesn't seem possible that it would be unable to fit an empty field into a text flow. What do you mean when you say that you have a "column that contains text in different lengths?" Is a column a field? Are your empty fields in a table? Are you applying tags to them? It's really difficult to say without a better explanation of the problem. Posting your template and data would help. Even posting the text rule and your copyfit rule would be helpful. Aside from that all I can really suggest is ensuring that the fields are truly empty in your data.
  6. An easier solution (read: a solution for the lazy - like myself) would be to just draw a graphic frame over your original background and pull in your new artwork by assigning a graphic rule to the new frame. This will allow you to continue using the same template for multiple background revisions without having to move your frames, rules, or create a completely different template. Here's how: Draw a graphic frame spanning the entire template Create a graphic rule called "Background" that will consist of the following: var bg = '/path/to/background.pdf'; // Change to fit your template bg = CreateResource(bg); bg.pagenumber = 2; // Optionally specify the page number in the PDF to return return bg; Assign the rule to the graphic frame: Click the "[Field or Rule]" drop down Select the "Background" rule you just created. If you don't see it, you may have created a text rule instead of a graphic rule Set the "fill" to white Adjust aligning and scaling as you see fit. Move the frame to the back (FusionPro > Layers > Send Frame to Back) I typically set my templates up like this initially. Admittedly, I don't include any graphics in my template files but you could easily remove them from yours with PitStop or a similar tool if you are worried about the original background causing the job to compose with unused spots or something (though with the white fill in the graphic box, I don't think that would happen).
  7. I think what you should do is return your headers within a table. This will give you the ability to set a top and bottom margin as well as add a border to the top and bottom of the row. Using the TextMeasure functionality, you'll be able to variably set the width of the table to the width of the text within it so that the borders will match the text within it. Here's a sample: var field = Field("YOUR FIELD HERE"); var spaceAbove = 100; var spaceBelow = 100; // Function to determine width of the lines based // on the width of the text between them. // // ** Make sure the properties match // the text you are returning ** function getTextWidth(input){ var tm = new FusionProTextMeasure; tm.font = 'Helvetica'; tm.pointSize = "12 pt" tm.CalculateTextExtent(input); var result = tm.textWidth; return result; } // Create a table var table = new FPTable table.AddColumns(getTextWidth(field)); cell = table.AddRow().Cells[0]; cell.Margins = {Top: spaceAbove, Bottom: spaceBelow, Left: 0, Right: 0}; cell.VAlign = 'Middle'; cell.SetBorders('Thin', 'Black', 'Top', 'Bottom'); cell.Content = field; return table.MakeTags().replace('<table','<table alignment=center');
  8. Be careful when you adjust the OnCopyfit callback to modify the content of a text flow. I'm glad that code worked for you, but that code affects every text frame that you have set to copyfit – not just the single variable on the back. Meaning: if one of the other frames within that template was unable to copyfit the contents using the parameters you have set, the font would be changed as well. Speaking of which, changing the font after failing to copyfit the text is not ideal either. While I (think I) understand that you're wanting to use a "condensed" font if the text doesn't fit, changing the font after the function has run on what I assume is a non-condensed version of the font will result in a smaller font size (i.e. the point size of a condensed font may not need to be reduced as much as it's non-condensed counterpart to fit within the frame) and still does not guarantee the text was not truncated despite condensing the font. I think you'd want to copyfit both fonts in that scenario: if (!Copyfit(new MagnifyAttributes("text", 8, 70, 8, 70))) { // If it doesn't fit, change the font to condensed and try again FusionPro.Composition.CurrentFlow.content = '<span font="Gotham Condensed Medium">' + FusionPro.Composition.CurrentFlow.content + '</span>'; if (!Copyfit(new MagnifyAttributes("text", 8, 70, 8, 70))) { ReportWarning("Could not copyfit text in flow " + FusionPro.Composition.CurrentFlow.name); } } Including an example of what you're working with (at the very least) would be helpful. Perhaps if you included the CopyfitLine rule that you wrote in your post, we could make sense of the error that you received. I'm assuming that error appeared when you ran the job and not when you validated your rule? Regardless, I believe you were on the right track with the CopyfitLine function. Depending on what you want the output to look like, you might even want to try the CopyfitEmail function. If you'd rather FP only adjust the width of the characters as opposed to the size of the characters you can do that like so: var email = Field('email'); // Your email field var font = 'Gotham Medium'; var condensedFont = 'Gotham Condensed Medium'; var size = 12; // font size (in points) var minSize = 8; try { var width = FusionPro.inValidation ? 72 : GetSettableTextWidth(FindTextFrame(FusionPro.Composition.CurrentFlow.name))/100; } catch (e) { return 'Remember to name this text frame & set the rule to "Re-evaluate for every text flow"'; } return CopyfitLine("", email, font, size, width, minSize, true); If you want to change the font to "condensed" if the line has been copyfitted to the smallest allowed pointsize, you can do this: var email = Field('email'); // Your email field var font = 'Gotham Medium'; var condensedFont = 'Gotham Condensed Medium'; var size = 12; // font size (in points) var minSize = 8; try { var width = FusionPro.inValidation ? 72 : GetSettableTextWidth(FindTextFrame(FusionPro.Composition.CurrentFlow.name))/100; } catch (e) { return 'Remember to name this text frame & set the rule to "Re-evaluate for every text flow"'; } var result = CopyfitLine("", email, font, size, width, minSize); if (new RegExp('newsize=' + minSize + '.0').test(result)) result = CopyfitLine("", email, condensedFont, size, width, minSize); return result;
  9. Please remember to use "code" tags when posting code in your thread. It makes it difficult to follow along with your question when you have sentences and code co-mingling without anything obvious to differentiate between the two. If you're unfamiliar with how to format code in the context of this forum, check out this post. Anyway, I'd bet the differing spacing is coming from Scala's (the font) interpretation of the non-breaking space entity ( ). So, if you temporarily switched the font to Helvetica, for example, you'd see even spacing between your examples. With that in mind, you could change the font that the non-breaking spaces display in to Helvetica and get the results you're looking for: function SetNoBreakPhrases(str) { var NoBreakPhrases = [ "Very Happy New Year", "Happy New Year", "Holiday Season", "New Year", // add as many as you like ]; for (var p in NoBreakPhrases) { var re = new RegExp("(" + NoBreakPhrases[p] + ")", "gi"); str = str.replace(re, function(w){return NormalizeEntities(w).replace(/ /g, " ");}); } return str; } var myPointSize = Field("mainfontsize"), 2); //grabs the leftmost 2 digits from the field to get the point size var myFontFace = Field("MainFontFace"); var myFontColor = Field("MainFontColor"); var greeting = (Field("ChooseMainGreeting") == 'Custom Greeting') ? Field("CustomGreeting") : SetNoBreakPhrases(Field("ChooseMainGreeting")); var tags = '<z newsize="'+myPointSize+'"><f Name="'+myFontFace+'"><color Name="'+myFontColor+'">' if (greeting == 'No Greeting') return ''; return tags + greeting.replace(/ /g,'<f name=Helvetica> <f Name="' + myFontFace + '">');
  10. I don't understand why you've created a rule to return other rules with formatting. Why not just put your rules into the text editor and apply the formatting there rather than with tags? Regardless, I'm always weary about returning tags if they aren't tagging anything for this very reason. If you really want to format the text via tags as opposed to the rules themselves or the text editor (as I previously mentioned), one thing you could do is check that your rule is not just entirely tags by slightly modifying your code to be: [color="Red"]var result = [/color]'<z newsize="9.94">' + ToUpper(Rule("RULE 1st address comma")) + '<br/>' + ToUpper(Field("1stCity")) + ", " + Field("1stState") + " " + Field("1stZipcode") + '<br/>' + '<f name="Gotham Medium">' + '<z newsize="12.94"/>' + Rule("RULE 1st phone"); [color="red"]return (Trim(RawTextFromTagged(result)) != ',') ? result : '';[/color]
  11. Since the crop mark settings are configured in your .fpi file, no, FusionPro can not edit them based on composition-time data. You can create two imposition files (one with crop marks and one without) and specify the correct one when you're composing your job. Alternatively, if you're composing with Server, you could script something that edits the cfg file to point to the correct fpi file per job or just edit the fpi file for each job.
  12. I imagine it has something to do with how FP/MarcomCentral is interpreting tagged text. As in, maybe the break tags themselves (<br>) in your data are being converted to HTML entities: <br> This is a sort of "catch all" regex that will replace a variety of page breaks with "<br>" and then create an array by splitting on the "<br>": return Field("BenefitsList").replace(/<p>|\r|\n|<br>|<p>/g,'<br>').split('<br>');
  13. Is the issue only with previewing? Do the images show up in composition? If not, is there any indication in the .msg log why that images aren't showing up? If you rename one of the images that does preview as one of the images that doesn't preview, what's the result? If it no longer previews, then I'd assume it has something to do with the image title. Are they all in the same directory? It would be helpful if you could upload a sample, or your template/data/rule/photos.
  14. Yes, it can. I believe that feature extends back to FP8 and while you may want to upgrade your versions of FP to the latest version for other reasons (you can check the release notes and decide for yourself) that particular feature is already available to your FP users. Yes. I assume to promote the purchase of FP Server or FP Producer. Okay, so are you suggesting that 15 designers are creating 300-400 proofs for variable data jobs each? Meaning that (on the lowest end of the scale) they are creating 4,500 jobs that need to be processed by 3 versions of FusionPro Creator? Not only is that 1,500 jobs/FP user a month (~75 jobs a day), but with FusionPro Creator, each composition is run locally on the machine FP is installed on. I would hope that my math is incorrect because that seems like a tremendous bottle neck in the process or at the very least a reason to purchase 15 licenses for the designers or FusionPro Producer so that the composition load could be offset to a server. (The latter option allowing you to variably move frames without a border and fill). I understand your reluctance but unfortunately without seeing how you're creating the Word files from the script, I can't really offer you any suggestions. You can create text resources within the GUI of FusionPro itself (I won't go into the specifics here because it's pretty well documented in the FusionPro documentation) or you can use the "CreateResource" function that allows you to specify a specific text file you'd like to import. As far as the x/y and width/height goes, I wouldn't include it in the text resource files. Keeping in mind that variably adjusting the text frame attributes (x,y,width,height,columns,etc) is not something you're going to be able to utilize with your current setup, this is essentially what I would do (examples below): Write your tagged text strings to individual .txt files For each tagged text file (.txt) create a record in an external data file that pulls in the content for each frame (as well as attributes if you're running on Server or Producer) Sample Tagged .txt file (Tagged1.txt): <span color="White" font="GoudyOldStyle" pointsize="11">Prepared Especially For</span> <p><span color="White" font="GoudyOldStyle" pointsize="19"><variable name="Full"></span> Sample External Data File (data.csv): Frame,width,height,x,y,content "Frame1","28800","43200","1800","900","/path/to/Tagged1.txt" "Frame2","43200","43200","900","21600","/path/to/Tagged2.txt" And then you'd call the external data file in an OnRecordStart rule to populate each text frame with the correct content and variables: data = new ExternalDataFileEx('/path/to/data.csv',','); for (var i=1; i<=data.recordCount; i++) { var frame = FindTextFrame(data.GetFieldValue(i, 'Frame')); var att = ['width','height','x','y']; for (var n in att) if (a = data.GetFieldValue(i, att[n])) frame[att[n]] = a; frame.content = RawTextFromTagged(CreateResource(data.GetFieldValue(i, 'content')).content); } I've attached an example template from the samples you supplied so that you can get an idea of how everything I've mentioned above would work. FP_example.zip
  15. The problem is just as the error suggests: You haven't defined the "PROVIDER_DATA_FINAL" variable that you're referencing here (in red) for (var i = 1; i <= EDF_PROVIDER_DATA_FINAL.recordCount; i++) { [color="Red"]PROVIDER_DATA_FINAL[/color][i - 1] = new PROVIDER_DATA_FINAL( EDF_PROVIDER_DATA_FINAL.GetFieldValue(i,"LONG"), EDF_PROVIDER_DATA_FINAL.GetFieldValue(i,"LAT"), EDF_PROVIDER_DATA_FINAL.GetFieldValue(i,"NAME"), EDF_PROVIDER_DATA_FINAL.GetFieldValue(i,"TEL"), 0); } You can fix that by defining it: [color="Red"]var PROVIDER_DATA_FINAL = [];[/color] for (var i = 1; i <= EDF_PROVIDER_DATA_FINAL.recordCount; i++) { PROVIDER_DATA_FINAL[i - 1] = new PROVIDER_DATA_FINAL( EDF_PROVIDER_DATA_FINAL.GetFieldValue(i,"LONG"), EDF_PROVIDER_DATA_FINAL.GetFieldValue(i,"LAT"), EDF_PROVIDER_DATA_FINAL.GetFieldValue(i,"NAME"), EDF_PROVIDER_DATA_FINAL.GetFieldValue(i,"TEL"), 0); } But I don't think that's going to help you very much because that entire block of code doesn't make much sense. I think what you want to do is something like this: EDF_PROVIDER_DATA_FINAL = new ExternalDataFileEx("PROVIDER_DATA_FINAL.csv",","); if (!EDF_PROVIDER_DATA_FINAL.valid) ReportError("PROVIDER_DATA_FINAL.csv not successfully loaded..."); var fields = ['LONG','LAT','NAME','TEL']; for (var i in fields) FusionPro.Composition.AddVariable(fields[i], EDF_PROVIDER_DATA_FINAL.GetFieldValue(FusionPro.Composition.inputRecordNumber, fields[i])); There are also plenty of threads on this forum that relate to External Data that you might find helpful: http://forums.pti.com/search.php?searchid=900608
  16. Hm okay well then you'd put this in your OnRecordStart rule: FindTextFrame("specific text frame").suppress = (Field("certain field") != 9);
  17. Can you be a little more descriptive? Collecting your template with some sample data and posting it would probably get you an answer the quickest. Outside of that, a picture would at least help. What do you mean 4 boxes? Four text frames? How are you populating those four (or three) text frames in the first place? OnRecordStart rule? Text rule? Could you post the rule? Do you have 12 different pages in your template (one for each variation of the art) or are you using a one-paged template with frames that need to accommodate each of the 12 scenarios? What you're trying to achieve is probably possible but I have no idea how to start answering your question without more information from you.
  18. Well, honestly I have no experience with CorelDraw nor VisualBasic programming. I'm also making some assumptions: You're running Windows You're running FusionPro Creator 9.3.21 You do not own a license for FusionPro Server (which would allow you to variably edit the layout by editing the DIF file prior to compositions) That being said: With FusionPro Creator 9.3.21, it is not possible to create variable frames but you can create several frames in a template (suppress the ones you don't want to use) and adjust their width and height as well as their x/y coordinates. The caveat being: the output will have a randomly colored border/fill applied to the moved frames unless you're running the composition with FusionPro Producer. Wow that is quite a workflow and the Word document step does seem excessive but it really seems like you're trying to automate a process that shouldn't/can't be automated. Setting up the template in FusionPro is just as important as setting up the art file in CorelDraw. To me, it seems like the easiest solution would be to: Create the art file in CorelDraw (excluding any variable text/graphics) Export a PDF of the above mentioned static art Create the FP template with FPO text for the variables (pulling in the PDF as a variable graphic) If you do it that way you eliminate the need for VB or Word. If there are static elements that need revising, you revise them, make a new PDF, and the template pulls in the changes. This way the frames are created and positioned correctly, the text is formatted correctly, and the client's proof is an accurate representation of what the output file will look like. Then it's just a matter of swapping out the FPO data file with your live data and recomposing the job for production. Alternatively, if you're set on using VB to pull out the text and formatting, it would be helpful if you'd post that on the forum between CODE tags: [code] // Your code [/code] If your script is pulling out the formatting, you might just be able to write that to a text file that you can pull in as a (tagged) text resource like this: <f name="Helvetica"><z newsize="12.0"><color name="Black">Paragraph 1 in Helvetica with a <variable name="YOUR VARIABLE NAME">
  19. Well it's really hard to say without seeing your data, your external data, or your template. If you would upload them you'd probably get better results out of this forum rather than saying "why doesn't this code work?" and leaving us to guess. But generally speaking, this part looks like it should be working: i = XDF_Address.FindRecord("Value", Field("UserID")); FirstName = XDF_Address.GetFieldValue(i, "MultiFirstName"); LastName = XDF_Address.GetFieldValue(i, "MultiLastName"); Address1 = XDF_Address.GetFieldValue(i, "MultiAddr1"); Address2 = XDF_Address.GetFieldValue(i, "MultiAddr2"); City = XDF_Address.GetFieldValue(i, "MultiCity"); But, again, I'm assuming that you've defined your external data file as 'XDF_Address' and the field that matches up with your 'UserID' field is called "Value." If you return the 'FirstName' variable, do you get the correct result? Anyway, there are some other issues (highlighted in red): if (FusionPro.inValidation) Rule("OnJobStart"); var FirstName = ""; var LastName = ""; var Address1 = ""; var Address2 = ""; var City = ""; [color="Red"]var PA1 = "";[/color] i = XDF_Address.FindRecord("Value", Field("UserID")) [color="red"]{[/color] FirstName = XDF_Address.GetFieldValue(i, "MultiFirstName"); LastName = XDF_Address.GetFieldValue(i, "MultiLastName"); Address1 = XDF_Address.GetFieldValue(i, "MultiAddr1"); Address2 = XDF_Address.GetFieldValue(i, "MultiAddr2"); City = XDF_Address.GetFieldValue(i, "MultiCity"); [color="red"]}[/color] [color="red"]var PA1 = "";[/color] [color="red"]PA1 = [/color]AppendText(PA2, " ", FirstName); [color="red"]PA1 = [/color]AppendText(PA2, "<p>", LastName); [color="red"]PA1 = [/color]AppendText(PA2, "<p>", Address1); [color="red"]PA1 = [/color]AppendText(PA2, "<p>", Address2); [color="red"]PA1 = [/color]AppendText(PA2, "<p>", City); return PA1; Firstly, you don't need those brackets – they aren't doing anything. Secondly, notice that you've defined 'PA1' a total of seven times. What does the 'AppendText' function do? And where is 'PA2' defined? If 'PA2' is a paragraph defined elsewhere, you might be able to change that to the code below to get better results: var PA1 = [FirstName,LastName,Address1,Address2,City].join('<p>'); return PA2 + ' ' + PA1; So all together, you could rewrite the rule to be: if (FusionPro.inValidation) Rule("OnJobStart"); var i = XDF_Address.FindRecord("Value", Field("UserID")); var FirstName = XDF_Address.GetFieldValue(i, "MultiFirstName"); var LastName = XDF_Address.GetFieldValue(i, "MultiLastName"); var Address1 = XDF_Address.GetFieldValue(i, "MultiAddr1"); var Address2 = XDF_Address.GetFieldValue(i, "MultiAddr2"); var City = XDF_Address.GetFieldValue(i, "MultiCity"); var PA1 = [FirstName,LastName,Address1,Address2,City].join('<p>'); return PA2 + ' ' + PA1;
  20. I appreciate that, Dan! I actually have a FP9 license, though. I just can't upgrade my desktop version until our SysAdmin upgrades our production servers to FP9. But, if you'd like to muscle him into making that upgrade, I'll DM you his phone number
  21. Template, data, and the external data file you're using to make the table. If you're running FusionPro 9, I won't personally be able to look at it for you (since I'm running an older version) but I'm sure someone on the forum would be happy to take a look.
  22. I agree with Dan that it's really difficult to tell for sure from the very little information you've given. I understand that the data is sensitive but it's not that hard to create "dummy" data and it really goes a long way when you have code like yours that references functions that you haven't included. Anyway, if you're looking for just a band-aid fix that will not return the table if the 'total' is 0, then you can just change your return line to this: return totalPaid ? table.MakeTags() : ''; Of course, that's if you aren't referencing this 'Rule_Table' variable anywhere (but like I said - how would I know?). If you are then you probably want to make the last lines look like this: var result = totalPaid ? table.MakeTags() : ''; FusionPro.Composition.AddVariable("Rule_table",result,true); return result;
  23. It's all good, Doug! It happens all the time (I mean, there's a webpage dedicated to it) but I just wanted to point it out in case you weren't aware so you wouldn't google how to do something in Java and then try to apply it to FP. Anytime!
  24. You can definitely do this with tables. In fact a simple search of the forums would point you to several threads of people doing exactly what you're asking (http://forums.pti.com/showthread.php?t=3179 or even http://forums.pti.com/showthread.php?t=2087) but I digress. You say there are (up to) 14 fields but the example you posted looks more like there will be 3 fields per service. Here's a generic way to get you where you're trying to go: var fields = [ Field('Service1'), Field('Service2'), ].filter(String); var table = new FPTable; table.AddColumns(7200); // 7200 = 1 inch column table.ShadingColor1 = "White"; table.ShadingPct1 = 100; table.ShadingColor2 = "Khaki"; table.ShadingPct2 = 100; table.ShadingType = "ByRow"; for (var i in fields) { var row = table.AddRow(); row.SetContents(fields[i]); } return table.MakeTags(); Wherein you can add as many fields as you'd like to that "fields" array. If all of the fields are named "Service" followed by a sequential number, you could populate that array using a for loop: var fields = []; for (var i=1; i<=14; i++) fields.push(Field('Service' + i)); fields = fields.filter(String); If each service has it's own corresponding "Title," "Description," and "Rate" field, the code would look more like this: var fields = []; for (var i=1; i<=14; i++) fields.push([Field('Title' + i), Field('Description' + i), Field('Rate' + i)]); fields = fields.filter(function(s){ return s.join(''); }); var table = new FPTable; table.AddColumns(7200, 7200); // 7200 = 1 inch column table.ShadingColor1 = "White"; table.ShadingPct1 = 100; table.ShadingColor2 = "Khaki"; table.ShadingPct2 = 100; table.ShadingType = "ByRow"; for (var i in fields) { var row = table.AddRow(); var col = row.Cells[0]; col.CopyCells(0,1); var [title, description, rate] = fields[i]; row.SetContents(title + '<br>' + description, rate); } return table.MakeTags();
  25. I'm not sure I understand why that is but, regardless, I'm not sure why that matters. Personally, I think it's better to get the data in a format that will give you the output you want before it gets to FusionPro because you'll either have to re-format the data within FusionPro (as I mentioned previously by importing as an External Data file) or you won't be able to impose out of FusionPro. What it boils down to is: FusionPro can not impose the job the way you want when each record produces a single page. Again, I'm not sure I understand what you mean by that. But if you're saying you'd have to make a separate body page for each data column you add, that's not true. You'd probably want to look into making use of a Repeatable Component (or Template page). If you're adding a bunch of 'else if' statements, then yes you'd need a much larger OnRecordStart rule but if all of your pages are turned off by default, your OnRecordStart rule could simply be made: if (Field("PageType") == "Letter") { FusionPro.Composition.OpenNewOutputFile(Field("Donor ID") + "-" + Field("Donor Name") + "-Qty" + Field("Quantity") + "." + FusionPro.Composition.outputFormatExtension); } FusionPro.Composition.SetBodyPageUsage(Field("PageType"), true);
×
×
  • Create New...