Jump to content

Using repeat record and split


Recommended Posts

I have a csv file with 72 records, and a repeat record column. I am also imposing the file to 9 up front and back. I'm trying to find a way for Fusion to compose record 1 n*many of times and then record 2 n*many of times and create separate PDFs for each.

 

Ex:

Title Repeat

Acme 500

Bravo 800

 

PDF1 would be Acme with infinite stack for 500 pieces, PDF2 would be Bravo with infinite stack with 800 pieces and so on.

 

Any help is greatly appreciated

Link to comment
Share on other sites

First, you will need to ensure that you are starting out with a 1-up template. Then define your9-up layout using FusionPro's FP Imposer. This imposition file will be linked

prior to composition via the Composition Settings Menu's "Imposition " tab.

FusionPro 6 has the function to repeat record for your template. As long as the repeat count field is specified in your flat file, it will return the desired output.

 

Use the following example as indicated in the User Manual to help.

 

 

Defining Data Automatically Repeating a Record

 

Automatically Repeating a Record

 

A common need in FusionPro is to repeat a given record’s data as if that record were repeated in

Overview

the input stream. This is needed, for example, if each record prints an insurance letter and card

and the value in the data stream indicates how many cards to print for each household. A job can

be set up where the OnRecordStart rule is set to the number of times to repeat a record.

 

Imagine that the field NumberOfCopies contains the number of times a record should be emitted.

 

Step-by-step

One can set up a job to repeat based on this value by following these steps:

1. In your FusionPro job, open the rules palette by pressing the yellow rule button in the toolbar. Select to create a new callback rule called OnRecordStart.

2. Since we know the field which will contain the repeat value, we can set up a single line of JavaScript to read that field value and set the repeat count for that record like so:

 

FusionPro.Composition.repeatRecordCount = Field(“NumberOfCopies”);

 

3. Note that OnRecordStart will be called over and over for each “repeat” of the record. The value set in repeatRecordCount is only read by FusionPro the first time. On subsequent repeats it is a read-only value that indicates the number of times the record will be repeated.

 

4. Note that the value set in repeatRecordCount can be computed based on a number of fields and can be the result of calculations. For example, if only residents of New York should get 2 copies and everyone else should get one, the following lines of JavaScript in OnRecordStart would achive this:

 

FusionPro.Composition.repeatRecordCount = 1;

 

if (Field(“State”) == “NY”) FusionPro.Composition.repeatRecordCount = 2;

 

For standard operations, this small amount of JavaScript is all that is needed.

 

The following is for more advanced applications of the repeat capability.

When repeating records, it can become confusing when computing what copy of a given record is Advanced Details being processed. For this reason new properties of the FusionPro.Composition object have been created. See the FusionPro Rules System Guide for details on the FusionPro.Composition object and how to use it.

 

The following properties are all read-only and are available to help determine proper processing in your JavaScript rules.

 

FusionPro.Composition.repeatRecordNumber -

 

 

The sequence number of the current original input file record being repeated.

FusionPro.Composition.inputRecordNumber - The current input record number, not

 

 

counting repeated records and skipped records. This indicates what the original input file’s record was.

FusionPro.Composition.outputRecordNumber - The current output record number,

 

 

counting repeated records and skipped records.

 

FusionPro.Composition.outputRecordNumberBySheet - The current output record

 

 

number by imposed sheet (taking into account reordering due to stacking). For jobs that do not have stacked imposition, this number is not significant. This is mostly used only for issuing logging information, such as that a given record was the nth on an imposed sheet.

 

FusionPro.Composition.processedRecordNumber - The current composed record number, counting

Link to comment
Share on other sites

If you are setting it up for 9-up and you want 1 pdf of the imposed 9, then you would have to output in chunks of 9. Also, you wouldn't have an infinate stack in imposer, your stack would be 1 because you only want one pdf for the 9-up layout. Seems like an odd way to do this but I'm sure you have your reasons.
Link to comment
Share on other sites

Setting the output number of records to 1 does not work.

 

Seems like an odd way to do this but I'm sure you have your reasons.

Reading through the OP again, I'd have to agree. Why wouldn't you just impose each record 9-up per page one time and then enter a quantity on your press for each 9-up set. Generating duplicate pages for each record, especially in the PDF format, is just going to increase your RIP time, no?

Link to comment
Share on other sites

Here's a more detailed example:

 

Title Repeat

Acme 5500

Bravo 600

Charlie 400

 

I want PDF-1 to be 612 pages, only containing Acme. PDF-2 would be 67 pages. PDF-3 would be 45 pages.

 

I should also mention that I have a running sequence number on the pieces. So PDF-1 would be 612 pages, 9 up, with each piece numbered 10000 - 15499, with infinite stack, so it's easily cut, and kept in order. PDF-2 would be have the pieces numbered 15500 - 16099, and so on.

Link to comment
Share on other sites

According to a thread I read a while back, you cannot chunk the file based on a field or javascript. It can only be chunked based on the value in the compose settings.

 

"There's no way to break up the output file into arbitrary "chunks" like this in current versions of FusionPro. If you need to separate the output like this, you'll need to run separate compositions." from: http://forums.printable.com/showthread.php?p=4515#poststop

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...