Jump to content

Sequential in Ranges

Recommended Posts

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);

Link to comment
Share on other sites

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 by ThomasLewis
Simplified the code a little bit so it's easier to understand
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...