Jump to content

Skip records in single page vs. composed

Kevin Fay

Recommended Posts

I ran into an issue last night as a job was being folded. I have a 4 page document that I composed as single pages for the customer to proof. They decided that some of their people did not have correct data, and therefore they should not get a statement. Instead of altering the data file (100+ columns and 15,000+ records), I made a script in the OnRecordStart that turned off all 4 pages if the person met certain criteria.


if (Field = "A") {
   FusionPro.Composition.SetBodyPageUsage("1", false);
   FusionPro.Composition.SetBodyPageUsage("2", false);
   FusionPro.Composition.SetBodyPageUsage("3", false);
   FusionPro.Composition.SetBodyPageUsage("4", false);


When I composed to single pages, it did not output anything for those records. It may have yelled at me about not having a page.


When I composed to an imposed sheet, the composition errored out when the first record of the output file was one of those records.


As the job was folding last night, I got a call that there were blank sheets. I went through the data and found that the skipped records output blank sheets within the job. We are imprinting shells, so we just wasted some sheets.


Why would single pages output nothing but imposed output produces a sheet? Is there a reason behind it or it is a bug?


Is there a different way that I should have done the skipping? Looking back through the forum/mail list, the code above was the way to skip records.

Link to comment
Share on other sites

If you compose a record, it requires at least one page of output. Since you set all your pages to not be used when your test returns true, FP is forced to add a blank page. Instead of setting body pages to not be used, you should skip the record altogether. Use this code in an OnRecordStart callback rule instead:

if (Field("YOUR_FIELD") == "test") {
  FusionPro.Composition.composeThisRecord = false;

In this scenario, FP will skip the record entirely and no page (blank or otherwise) will be required. :)

Link to comment
Share on other sites


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

  • Create New...