Jump to content

Output multiple files based on field value


cecprepress

Recommended Posts

Posted

Hello,

 

I'm using Fusion Pro Desktop 5.2 and I need to output a job based on a field value. Specifically, it is a mailing job and we are going to run the job by tray. What I want to do is create a rule that will tell Fusion Pro that all records for "Tray 1" will output to a file named "Tray 1". All records for "Tray 2" will output to a file named "Tray 2", etc...

I've done something similar, naming files based on a field, but I've never had to output multiples records to a single file in this fashion.

How would I create a rule for this procedure?

 

Any help is greatly appreciated.

Thanks,

RJ

Posted
How many different trays are we talking about? The basic way to do this is to create a different body page for each tray, use the Advanced -> Page Media dialog to specify a different tray pull for each page, then use the FusionPro.Composition.SetBodyPageUsage function in OnRecordStart to activate the one you want for each record.
Posted

That sounds like it would work for our purposes generally - most often the tray count will be 20 or less.

I've never used the page media function before. The manual says I need PostScript command files for the beginning and end. I assume I need a different command file for the beginning and end of each tray break. However, I have no idea how to set that up having never used it before.

Posted

cecprepress,

 

How is your mail being "tray sorted" as of now?

 

You have to take a look at is it worth it to print just the records of each tray at the press? Obviously you know that some trays may have only just a few records in them and some trays are full.

 

I would think that you would print the job as a whole and let bindery sort the job based on Endorsement or tray numbers that is produced from your mailing software and that would be printed in the address block.

 

Only time we output multiple batches is when the total number of sheets to run exceeds around 500.

So the output file name could be the following below:

Job#_Client Name_1.vdx

Job#_Client Name_2.vdx

Job#_Client Name_3.vdx

Job#_Client Name_4.vdx

Posted
Currently we output multiple files the same as you (based on # of sheets/records). Bindery does keep the jobs in order and trays them based on the endorsement line/tray number on the piece. We're trying to automate it a bit more for a few clients who we always have to output multiple files for and we figured we'd try to make it easier on bindery by having those multiple files correspond to the tray numbers.
Posted
we figured we'd try to make it easier on bindery by having those multiple files correspond to the tray numbers.

 

I guess if the press operator can RIP the file and slip sheet each of the potential 20 trays in a job without too much time spent, it might be a worth it. My only gripe I would think the Press Operator would have is Ripping a file that could just have a few records in them and keeping track of all the tray batches.

 

Good luck and keep us posted if you get your idea working and the results.

  • 2 weeks later...
Posted
How many different trays are we talking about? The basic way to do this is to create a different body page for each tray, use the Advanced -> Page Media dialog to specify a different tray pull for each page, then use the FusionPro.Composition.SetBodyPageUsage function in OnRecordStart to activate the one you want for each record.

 

I've got the page media set up now, but how do I tell it which page to use with which tray? I'm also getting an error saying "there is no page named "Insert1", which is the media I assigned to the first page of the document.

Could you let me know what I'm doing wrong with this set up?

Thanks

Posted
I've got the page media set up now, but how do I tell it which page to use with which tray?

You have to use the FusionPro -> Advanced -> Page Media dialog to associate body pages in your job with page media metadata. This only works for VDX and PostScript output.

I'm also getting an error saying "there is no page named "Insert1", which is the media I assigned to the first page of the document.

Could you let me know what I'm doing wrong with this set up?

The parameter to the FusionPro.Composition.SetBodyPageUsage function in OnRecordStart is a body page name, which is not necessarily the same as the name of VDX media type associated with the page. In order to name the body pages in your job, you need to use the FusionPro -> Manage Pages-> Page Usage dialog. The names you assign there are used in the rule. Those pages may (optionally) also have VDX media or PostScript command files associated with them.

Posted

Ok, I've got the page usage working to some degree. Here's what I've got in the file.

3 pages - Tray1, Tray2, Tray3 (named via Manage Pages > Page Usage)

I've got the following rule set up:

OnRecordStart

FusionPro.Composition.SetBodyPageUsage("Tray1", Field("Tray")==1)

FusionPro.Composition.SetBodyPageUsage("Tray2", Field("Tray")==2)

FusionPro.Composition.SetBodyPageUsage("Tray3", Field("Tray")==3)

 

When I go to output the file I get a single VDX file which has 2500 pages (there are 2500 records in the database) but only pages that have a value of 1, 2, or 3 in the "Tray" field have the variable data merged. The other pages are the blank shell.

 

So the above rule seems to work - the issue I need to address now is getting "Tray 1" to output to its own file, "Tray 2" to output to its own file, etc...

 

I tried a "OnNewOutputFile" rule, but it seemed to be overridden by the "OnRecordStart" Rule.

Posted
So the above rule seems to work - the issue I need to address now is getting "Tray 1" to output to its own file, "Tray 2" to output to its own file, etc...

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. You can either filter the data externally (by the Field "Tray") in a tool such as Excel, or you can do it at composition time with logic like this in OnRecordStart:

FusionPro.Composition.composeThisRecord = (Field("Tray")==1);

You can either hard-code the tray number in the rule, or read it from something external, like another data file or the output file name.

 

Or, you can let the post-press handle it as rpaterick suggested. If the data is grouped so that each tray's records are consecutive, you can make things easier on the bindery folks by adding a slip sheet between each "chunk." What you can do is set up the slip sheet as an Unused Body Page, then use FusionPro.Composition.SetBodyPageUsage to activate it when the field value changes, similar to the logic above, with the addition of a global variable to keep track of the field value. Something like this in OnRecordStart:

FusionPro.Composition.SetBodyPageUsage("Slip", LastTrayValue != Field("Tray"));
LastTrayValue = Field("Tray");

You'll also need to add this declaration in the JavaScript Globals:

var LastTrayValue = 1;

You can use the Advanced -> Page Media dialog to specify a different tray for the slip sheet pages as well.

Archived

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

×
×
  • Create New...