PDA

View Full Version : Help with on record start error.


mclisa81
August 9th, 2011, 11:27 AM
Can anyone help me with the following rule that throws an error when composing. The output is fine, I would just like to get rid of the error so it doesn't confuse other operators. I have a 2 pg template that is controlled by the on record start rule below. The error is "No page is emitted, please check page usage in your input file". I believe it happens when the value of Field BMarks is 0. Thanks.

if (Field("BMarks")=="0")
{
FusionPro.Composition.SetBodyPageUsage("Bookmarkfront", false)
FusionPro.Composition.SetBodyPageUsage("Bookmarkback", false)


}
else

FusionPro.Composition.repeatRecordCount = Field("BMarks");

Dan Korn
August 9th, 2011, 11:33 AM
If there's really nothing to compose for the record when the number is zero, then instead of turning off all the pages, just skip the record completely, like so:

if (Field("BMarks")=="0")
FusionPro.Composition.composeThisRecord = false;
else
FusionPro.Composition.repeatRecordCount = Field("BMarks");

mclisa81
August 9th, 2011, 11:35 AM
Great! Thanks for the quick reply Dan.