Jump to content

For a record, output some number of page 1


Recommended Posts

If I have a job of "flyer kits" with 5 pages, where page 1 represents the flyer, and pages 2-5 are instructions. I want to print 50 of page one for record1, and 50 of page 1 for record 2, etc. Or the number may even be a variable number (not 50) that I read from a column in the database. I don't see anything in the building blocks. I'm thinking this would be a FusionPro function vs. a JavaScript function.


I know how to construct a loop. But is there some command to tell FusionPro to produce output that I can call multiple times, i.e.,


for( int i = 0; i < Field["Number Of Flyers "]; i++)


ProduceOuptut(); <--- some FusionPro function to produce output?


Link to comment
Share on other sites

How many records are we talking about? While FP 6.0 allows for repeating all pages in a record (RepeatRecordCount), I don't know of a "RepeatPageCount" function.


If the data file were small enough to edit, I would repeat each record 5X and add a field for PageNumber. With each of the first 5 records, data would be identical except for PageNumber (record 1 = 1; record 2 = 2; etc) and NumberOfFlyers (record 1 = n; records 2-5 = 1). You would then edit pages (FusionPro menu -- Manage Pages...) to match naming convention in data and set all pages to be Unused.


Your OnRecordStart rule would use the SetBodyPageUsage function to pull the correct page number and the RepeatRecordCount function would repeat the correct page the appropriate number of times. As long as no variables referenced the record number, the resulting output would have the necessary pages in the correct order. Of course these functions require you to be using FP 6.0+.


If there is an easier option using JavaScript without editing the data, I would be interested in knowing it as well. Now that you've asked, I'm sure a similar scenario will arise for me too. :)

Link to comment
Share on other sites

Yeah, our workaround was three runs.


On run 1, I used a rule that Alex at Printable gave me that essentially creates another database with the correct number of recrods for each original record. So this run printed no output. I.E., it creates multiple records like the built-in function in FusionPro V6.


On Run 2, we wanted Flyer output - the appropriate number of Flyers for each recipient. So we ran against the new database, then using the OnRecordStart rule containing the appropriate SetBodyPageUsage() commands, we turned off the later pages and just printed the flyer page. Since there was a multiple of the record, we end up with the appropriate number of Flyer pages for each original recipient.


On Run 3, we ran against the original database, with OnRecordStart containing SetBodyPageUsage() commands that now turn off the Flyer page and just print the remaining pages (one set)for each recipeint.


Then we coallate the results of Run2 and Run3. For each recipeint, multiple Flyers and one set of the remaining pages.


Thanks for your analysis and your reply. I appreciate it.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...