Want to reset page numbering on ReportWriter - but how?

From: <jaakola_at_cc.helsinki.fi>
Date: 21 Mar 92 12:14:34 GMT
Message-ID: <1992Mar21.141434.1_at_cc.helsinki.fi>


I have SQL*ReportWriter version 1.1 and I have a simple problem which I have not succeeded to solve.

I want to print many invoices using ReportWriter in a single batch run (that is I start ReportWriter only once and I want to print several invoices during that run). Each invoice may span several pages. Each invoice page should have a page number. The page number of the first page of an invoice is 1, 2 for the second page and so on. On the next invoice the page numbering must again start with 1 and count upwards as usual.

THE PROBLEM IS: HOW CAN I RESET THE PAGE NUMBER WHEN THE INVOICE CHANGES? One work-around would be to print a single invoice during a run but that would be slow, tedious and very inelegant. One trivial solution would be to use another tool such as Pro*C but I need ReportWriter formatting and grouping capabilities. I have tried to use two RW fields P with source &PAGE and F with source &PAGE; the idea was that P would increment each page and F would store the page number of the first page number of the invoice, so that the page number that I want would be P-F+1 which I could calculate using &SQL. But I can't figure out how I could make RW evaluate P-F+1 on each page - it just evaluates it once!

Please if you have a solution, tell it to the rest of the world - I know many other people have encountered the same problem!

-Juhani Jaakola Received on Sat Mar 21 1992 - 13:14:34 CET

Original text of this message