Jump to content

Move to new sheet when field changes?


Recommended Posts

How would I go about beginning a new imposition sheet when a value (e.g. store number) changes? I know about FieldChanged("field_name") for arbitrary chunking, but I am not chunking output. I also saw the StartNewStack() method, but I am not stacking. I am creating a single output file with records in sequential order. Due to potentially large data files, we are trying to get by without preprocessing. I have a 36-up FPImposer template with records in data being imposed across/down each sheet before moving to next sheet. Sheets will be sent to client UN-trimmed (the sheet is kiss-cut and shipped as a full sheet of stickers).


I need to move to a new sheet when the store number changes in the data. If store 001 has 54 records, it will get one full sheet of 36 stickers and a 2nd sheet with 18 records -- the remaining 18 positions need to be blank. The 55th record (first record for store 002) begins on sheet 3.


Anyone have an idea on how to go about inserting blank records without a corresponding row of data? I'm thinking the OnRecordStart callback needs to insert (recordNumber % 36) blanks to force the next store/record to the next imposition sheet but I can't figure out how to do it.


Note: I didn't want to hijack blackbelt60's recent thread in the event our issues are different. It sounds like he is trying to do something similar.

Link to comment
Share on other sites

Hmm, I tried to look at your sample you referred to but I am unable to duplicate your output. The rules didn't come across in the zip file. I assume that is because the def file is not there.


Nevermind, figured it out! This works well!

Edited by dreimer
Link to comment
Share on other sites

Thanks Thomas. I admit I looked at your thread previously and discounted it without downloading the attachment thinking I was not chunking (which to me suggests multiple output files). But after looking at your example, it is exactly what I needed and done much more "elegantly" than I was thinking would be necessary. Much appreciated. :)
Link to comment
Share on other sites

  • 1 year later...

That is correct. I get an excel file with shirt orders for small, med, large, up to 6XLT. And another columns tells me how many of each shirt is needed to fulfill this specific order. I then create a label sticker for each shirt size that we send to our shirt vendor so they can count out enough and label them by size for easy picking later on. I used to just print the stickers out one after another running from sheet to sheet, but our vendor for the shirts says that is TOO COMPLICATED for them and wants each size on a separate sheet.


Link to comment
Share on other sites

EDIT: I think I misunderstood at first, this should work:


FusionPro.Composition.chunksBreakStacks = true;

var amount = parseInt(Field("Unit"));
FusionPro.Composition.repeatRecordCount = amount;
var rrn = FusionPro.Composition.repeatRecordNumber;

if (rrn == 1)

FindTextFrame("Content").content = '<color name="' + Field("Group") + '">' + rrn + " of " + amount;


The CSV should look like this:



Edited by ThomasLewis
Link to comment
Share on other sites



Thank you for your suggestion, but when I tried it the pages just ran together instead of breaking apart to a new page when the size code changed. I've attached my template and a sampling of the data file. All I'm printing is the size "S", "M", "XL", etc on a label. The field OrderQty lets me know how many of that specific label I need. I've attached as well the resulting pdf file from that test run, plus the results that I came up with the hard way...compiling the records one by one and then combinging the pdf files together afterwards.


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...