Jump to content

Recommended Posts

I have a set of coupons that number down the sheet.

They start at the number field (start #).

They need to have coupons total of (# of coupons).

They need to end, chunk a file and begin with the next field and new start number.

There is an imposition of 4Up and that part is working beautifully.

 

In my rules everything is working EXCEPT the numbers won't restart at #1 and continue from the previous file stack.

 

Attached is a sampling of the code, FusionPro file, and imposition if anyone wants to try to see what I mean.

 

Here are my rules:

 

OnJobStart

FusionPro.Composition.chunksBreakStacks = true;

 

OnRecordStart

if (FieldChanged("BMA Name") && FusionPro.Composition.repeatRecordNumber == 1)
   FusionPro.Composition.OpenNewOutputFile(Field("Job #") + "_" + Field("BMA Name") + "." + FusionPro.Composition.outputFormatExtension);

 

couponNumber

var strNumber = "<b><z newsize=10>N<z newsize=14><u><superscript>o</superscript></u><z newsize=12> </b>";

var bookCount = Field("# of books");
var couponPerBook = Field("# of coupons/book"); 
var totalCoupons = Field("# of coupons") 

FusionPro.Composition.composeAllRecords = false;
FusionPro.Composition.startRecordNumber = Field("start #");
FusionPro.Composition.endRecordNumber = Field("end #");
FusionPro.Composition.repeatRecordCount = totalCoupons; 

return strNumber + FormatNumber ("0000", CurrentRecordNumber());

 

The Books should stack by Ranch name after coupons complete. Example Ranch 1 has 4000 coupons number 0001-4000 and Ranch 2 has 6000 coupons number 0001-6000.

 

My first book should look like:

Ranch Name     No. 0001
Ranch Name     No. 0002
Ranch Name     No. 0003
Ranch Name     No. 0004
.....
Ranch Name     No. 3997
Ranch Name     No. 3998
Ranch Name     No. 3999
Ranch Name     No. 4000

 

The second book should look like:

Ranch Name     No. 0001
Ranch Name     No. 0002
Ranch Name     No. 0003
Ranch Name     No. 0004
.....
Ranch Name     No. 5997
Ranch Name     No. 5998
Ranch Name     No. 5999
Ranch Name     No. 6000

 

However, the books are stacking by Ranch name after # coupons complete but not restarting the sequence. Example Ranch 1 has 4000 coupons number 0001-4000 and Ranch 2 has 6000 coupons number 4001-10000.

 

Ranch Name     No. 0001
Ranch Name     No. 0002
Ranch Name     No. 0003
Ranch Name     No. 0004
.....
Ranch Name     No. 3997
Ranch Name     No. 3998
Ranch Name     No. 3999
Ranch Name     No. 4000

Ranch Name     No. 4001
Ranch Name     No. 4002
Ranch Name     No. 4003
Ranch Name     No. 4004
.....
Ranch Name     No. 9997
Ranch Name     No. 9998
Ranch Name     No. 9999
Ranch Name     No. 10000

 

Can someone tell me what code I am missing or what I did to cause it not to start a new numbering set on each new ranch output?

BMA Sample Coupons.zip

Edited by Landisa
found an error
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.

Guest
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...