auto-incrementing ref. number in a report.

Hi all,

I'm working on an invoice style report at the moment and I'm having a problem working out how I can get an incremental count to work.

what I wan't to achieve is for each report to have a reference number visible on it, and for the ref. no to auto increase with each run of the report.

Each time the report is run, the details/info will be passed to a custom table (along with the ref.no) so that if required, the 'invoice' can be re-printed by supplying the original ref. no.

If anyone has already done something like this and would be willing to share, or if you can offer any suggestions about how it can be done; I'd love to hear from you!

Many Thanks,

Paul.