Landisa Posted June 30, 2016 Share Posted June 30, 2016 (edited) Background: Simple coupons with sequential numbering set 4Up on a sheet. Problem: Sequential starting number works if I don't have "stack" set in the imposer. Once "stack" is set the starting number is disregarded and begins at 1. OnJobStart Code: var startNumber = 69000; //Enter the begin number provided. var totalCoupons = 1875; //Enter the number of total coupons var endNumber = (startNumber + totalCoupons) - 1; FusionPro.Composition.composeAllRecords = false; FusionPro.Composition.startRecordNumber = startNumber; FusionPro.Composition.endRecordNumber = endNumber; Empty Rule Code (CouponNumber): return CurrentRecordNumber(); FusionPro Imposer Settings: Simplex Stack Count 10000 OR Checked Infinite Stack Vertical Count 4 0" Spacing Goal: To have a coupon numbering system that did the counting down stack starting at a number other than 1 Answer: Made suggested changes to OnJobStart code and EmptyRule code provided by tou in the second post. Thanks! ^^, Edited June 30, 2016 by Landisa Change title to Solved Quote Link to comment Share on other sites More sharing options...
tou Posted June 30, 2016 Share Posted June 30, 2016 (edited) your onJobStart should reference the total number of coupons only... var totalCoupons = 1875; //Enter the number of total coupons FusionPro.Composition.composeAllRecords = false; FusionPro.Composition.startRecordNumber = 1; FusionPro.Composition.endRecordNumber = totalCoupons; your onRecordStart should be set to allow infinite stack to be set: FusionPro.Composition.chunksBreakStacks = true your serial # should use the system record # which is 1 and increment it by your starting coupon number: return CurrentRecordNumber()+69000; If you want to start at 69000, set 69000 to 68999.......or throw in a "-1" after the "69000" above. I think you can call global variables, but you'll need a onRecordEnd to increment it? I don't know global variables too well at this point. Sorry. Hopes this helps.Output.pdf Edited June 30, 2016 by tou Quote Link to comment Share on other sites More sharing options...
Landisa Posted June 30, 2016 Author Share Posted June 30, 2016 your onJobStart should reference the total number of coupons only... var totalCoupons = 1875; //Enter the number of total coupons FusionPro.Composition.composeAllRecords = false; FusionPro.Composition.startRecordNumber = 1; FusionPro.Composition.endRecordNumber = totalCoupons; your onRecordStart should be set to allow infinite stack to be set: FusionPro.Composition.chunksBreakStacks = true your serial # should use the system record # which is 1 and increment it by your starting coupon number: return CurrentRecordNumber()+69000; If you want to start at 69000, set 69000 to 68999.......or throw in a "-1" after the "69000" above. I think you can call global variables, but you'll need a onRecordEnd to increment it? I don't know global variables too well at this point. Sorry. Hopes this helps. Yes it does! This worked perfectly! Also, I didn't need the onRecordStart portion to get it to do what I needed it for. Thanks! ^^, Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.