LyndaEngelage Posted March 23, 2022 Share Posted March 23, 2022 I'm trying to create ticket covers that will print what ticket numbers are in each book. Each book has 7 tickets. Ex. book 1.(815255 TO 815261) book 2. (815262 TO 815268) book 3. (815269 TO 815275) and so on. I know how to use the numbering rule, but I need to skip the numbers in between. I found this on another post but don't know how to apply a specific start number and in increments of 7. return FormatNumber("000000", (CurrentRecordNumber() - 1) * 100 + 1) + "-" + FormatNumber("000000", CurrentRecordNumber() * 100); Quote Link to comment Share on other sites More sharing options...
ThomasLewis Posted March 23, 2022 Share Posted March 23, 2022 (edited) This might help break it down for you: var start_number = 815255; var increment = 7; var crn = CurrentRecordNumber() -1; var set_start = start_number +crn +(crn * increment); var set_end = set_start + increment; return set_start + "-" + set_end; Edited March 23, 2022 by ThomasLewis Simplified the code a little bit so it's easier to understand Quote Link to comment Share on other sites More sharing options...
LyndaEngelage Posted March 25, 2022 Author Share Posted March 25, 2022 Thank you, this is exactly what I needed. 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.