Hi,
I am writing a report to print a Goods Received Note as output from a Purchase Receipts program. I require each GRN to have a unique sequential number as it is printed. How can I do this please?
This of course will only work for a specific report, if you want to run at a later time you will end up with the same set of numbers. YOu can get over this by creating a parameter and using this to initialise GRN count, this is all manual and will require you to record the last GRN number.
Add an initialise formula to report header
@Initialse GRN Number
whileprintingrecords;
global numbervar GRN:= {?Last GRN+1};
There may be a better way but with out storing it in your database I could not think of one.
Thanks for the suggestions, but I suspect I will have to increment a counter in a separate table, and read from there. The GRN number allocation must be completely automatic, and just carries on sequentially day after day.
Would the running total suggestion store the counter each time...how would it work?
R.
Your database is likely designed to, but you'd have to share the type of database...
There's usually an autonumber function, perhaps you already have a Goods Received Note table, in which case just add an ID field to it with an autonumber.
Otherwise try posting technical information:
Crystal version
Database used
Example data
Expected output
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.