Hello,
For creating a SSCC barcode we need to count the total number of times a report has been printed. I would like to see that the report remembers how many times it has been printed. So everytime it prints I would like the barcodenumber be raised with '1'.
Is it possible for a report to remember a value? Or do I have place the number it has been printed somewhere in a field in a table? And if it has to be placed in a field, where, which field?
Thank you!
0
Comments
You'll need to store your value in a custom field somewhere.
You could use a number series for this. Just like orders are assigned a number from a series, your barcode could be also.
My Blog - nav.education
see in posted invoice form, you'll see field "no. printed" in the header. just take a look at the report being printed from the print button...basically you just have to put
myfield := myfield + 1; in the report...
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Take a look at the insert functions for sales header or purchase header to understand how number series are initialized and used.
Or just create a custom field and increment it.
My Blog - nav.education
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
there you will see a function called GetNextNo with these parameters:
NoSeriesCode (Code)
SeriesDate (Date)
ModifySeries (Boolean)
so pass in the number series code that you have created, today's date, and TRUE for Modify Series. If you pass in false it will return the next number but not update the series
IF NOT CurrReport.PREVIEW THEN
noSeriesMgnt.getNextNo(...)
This means that the user will no longer be able to print from the preview window however.