veseo
Sep 9th, 2007, 05:14 AM
I have two reports, each of which will be printed. I need to add an "autonumber" field to each of them, whose value will be different (+1) each time I print the report. The reports are about sales - each printed report should note the ID of the sale for storing purposes. I searched the forum and found a similar (or I thought that then) to my problem, but the problem in there was about listing the items and autonumbering them in the report, not autonumbering the report itself.
Also, the autonumber value should be restarted each year. Again for storing purposes - "Find me report #4514 from 2007" and such.
-----------
What came to me as an idea is to create a table in the DB each year (through the application, not manually) and each time I print, I add a record to that table, get the autonumber value, and then pass it to the report. But I find it way "too workaround" and in a few years, the DB will be a mess with lots of tables. Thanks in advance for any advices!
Also, the autonumber value should be restarted each year. Again for storing purposes - "Find me report #4514 from 2007" and such.
-----------
What came to me as an idea is to create a table in the DB each year (through the application, not manually) and each time I print, I add a record to that table, get the autonumber value, and then pass it to the report. But I find it way "too workaround" and in a few years, the DB will be a mess with lots of tables. Thanks in advance for any advices!