Fletch Posted February 9, 2010 Share Posted February 9, 2010 I have a job that has 411 records to variable print. Each record gets 80 prints numbered. The numbering starts at 000 for record 1, and continues to 079, then record 2 starts printing with the numbering starting at 080, and so on. When the 3-digit number reaches 999, it needs to start over at 000. How can I get each record to repeat itself 80 times, while uniquely numbering each of the 80 records? Should I run it twice? Make sense? Link to comment Share on other sites More sharing options...
Dan Korn Posted February 9, 2010 Share Posted February 9, 2010 When the 3-digit number reaches 999, it needs to start over at 000.However you're getting the number, just take its modulus of 1000 (the remainder when dividing it by 1000), like so: return FormatNumber("000", num % 1000);The FormatNumber function pads it with leading zeros to always return three digits (001, etc.). How can I get each record to repeat itself 80 times, while uniquely numbering each of the 80 records? In the OnRecordStart callback, simply do this: FusionPro.Composition.repeatRecordCount = 80;Then in a regular text rule: return FusionPro.Composition.outputRecordNumber;Or, putting it all together: return FormatNumber("000", FusionPro.Composition.outputRecordNumber % 1000);Please see this thread for an example: http://forums.printable.com/showthread.php?t=391 Link to comment Share on other sites More sharing options...
Fletch Posted February 9, 2010 Author Share Posted February 9, 2010 You rock! I owe you a steak. Link to comment Share on other sites More sharing options...
Fletch Posted February 11, 2010 Author Share Posted February 11, 2010 Here's what I have in my rule. return FormatNumber("000", FusionPro.Composition.outputRecordNumber % 1000);Rule("OnRecordStart") My numbering is starting at '001' and I need it to start at '000'. Is it something I'm doing wrong? Link to comment Share on other sites More sharing options...
Dan Korn Posted February 11, 2010 Share Posted February 11, 2010 My numbering is starting at '001' and I need it to start at '000'. Sorry, I missed the part about starting at zero. Just subtract one: return FormatNumber("000", (FusionPro.Composition.outputRecordNumber-1) % 1000); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.