Report page number across multiple report forms

Report page number across multiple report forms

Post by CJO » Tue, 16 Mar 1999 04:00:00



I have a report option that consists of several, perhaps a dozen or more,
different REPORT FORMs.  I want to provide a page number that spans all the
reports. I tried defining a public memvar with the idea of incrementing it
with every page for every report but have had no luck.  Was trying something
like:

PUBLIC pPageNo
pPageNo = 0

IF thisform.clients.value = 1
    REPORT FORM clients        && increment inside report
ENDIF
IF thisform.accounts.value = 1
    REPORT FORM accounts
ENDIF
IF thisform.cerveza.value = 1
    REPORT FORM cerveza
ENDIF

Not sure where i can increment the counter inside the report FOR EACH PAGE.
If i use the report VARIABLES, the counter value appears to be released at
the end of the report.  And i dont get the page count i want anyway.

Any suggestions?


Remove the nospam from the email address.

TIA

 
 
 

Report page number across multiple report forms

Post by Roger Ansel » Wed, 17 Mar 1999 04:00:00


One way!

In the header band of each report place a field top right.
In the report expression for the field put :
pagenum()

Create a program called pagenum.prg

Code for pagenum prg:

pPageNo=pPageNo+1
RETURN TRAN(pPageNo)

Roger


>I have a report option that consists of several, perhaps a dozen or more,
>different REPORT FORMs.  I want to provide a page number that spans all the
>reports. I tried defining a public memvar with the idea of incrementing it
>with every page for every report but have had no luck.  Was trying something
>like:

>PUBLIC pPageNo
>pPageNo = 0

>IF thisform.clients.value = 1
>    REPORT FORM clients        && increment inside report
>ENDIF
>IF thisform.accounts.value = 1
>    REPORT FORM accounts
>ENDIF
>IF thisform.cerveza.value = 1
>    REPORT FORM cerveza
>ENDIF

>Not sure where i can increment the counter inside the report FOR EACH PAGE.
>If i use the report VARIABLES, the counter value appears to be released at
>the end of the report.  And i dont get the page count i want anyway.

>Any suggestions?


>Remove the nospam from the email address.

>TIA


 
 
 

Report page number across multiple report forms

Post by Paul Borowic » Wed, 17 Mar 1999 04:00:00


Try:

PUBLIC pPageNo
pPageNo = 0

IF thisform.clients.value = 1
    REPORT FORM clients        && increment inside report
ENDIF

IF thisform.accounts.value = 1
    pPageNo = pPageNo +_pageno
    REPORT FORM accounts
ENDIF

IF thisform.cerveza.value = 1
    pPageNo = pPageNo +_pageno
    REPORT FORM cerveza
ENDIF

In your reports for pageno, put in the expression:

(PageNo +_pageno)

HTH,

--Paul


>I have a report option that consists of several, perhaps a dozen or more,
>different REPORT FORMs.  I want to provide a page number that spans all the
>reports. I tried defining a public memvar with the idea of incrementing it
>with every page for every report but have had no luck.  Was trying
something
>like:

>PUBLIC pPageNo
>pPageNo = 0

>IF thisform.clients.value = 1
>    REPORT FORM clients        && increment inside report
>ENDIF
>IF thisform.accounts.value = 1
>    REPORT FORM accounts
>ENDIF
>IF thisform.cerveza.value = 1
>    REPORT FORM cerveza
>ENDIF

>Not sure where i can increment the counter inside the report FOR EACH PAGE.
>If i use the report VARIABLES, the counter value appears to be released at
>the end of the report.  And i dont get the page count i want anyway.

>Any suggestions?


>Remove the nospam from the email address.

>TIA

 
 
 

Report page number across multiple report forms

Post by Anders Altber » Wed, 17 Mar 1999 04:00:00


The system variable _PAGENO always resets to 0 at the start of a report. It
stays in memory after the report. so if you use a page numbering field in
the report with the expression
_PAGENO + nPagesAccumulated
and recalculate nPagesAccumulated after each report you should be ok.

nPagesAccumulated = 0
report form report1
nPagesAccumulated = _PageNo + nPagesAccumulated
report form report2
nPagesAccumulated = _PageNo + nPagesAccumulated
report form report3

-Anders


>I have a report option that consists of several, perhaps a dozen or more,
>different REPORT FORMs.  I want to provide a page number that spans all the
>reports. I tried defining a public memvar with the idea of incrementing it
>with every page for every report but have had no luck.  Was trying
something
>like:

>PUBLIC pPageNo
>pPageNo = 0

>IF thisform.clients.value = 1
>    REPORT FORM clients        && increment inside report
>ENDIF
>IF thisform.accounts.value = 1
>    REPORT FORM accounts
>ENDIF
>IF thisform.cerveza.value = 1
>    REPORT FORM cerveza
>ENDIF

>Not sure where i can increment the counter inside the report FOR EACH PAGE.
>If i use the report VARIABLES, the counter value appears to be released at
>the end of the report.  And i dont get the page count i want anyway.

>Any suggestions?


>Remove the nospam from the email address.

>TIA

 
 
 

1. Help: Retaining Report Page Layout When Calling Report From Form

Using Paradox 5 (maintenance version), I am trying to print envelopes
to an HP LJ3 from a form. What does work is to pull up the report from
Project Viewer or whatever and print from it; the printer will ask for
COM-10s (envelopes). This is good. _But_ I can't call the report from
a form's pushbutton like:

        report.print("report.rdl")

It just prints according to the default Windows printer's settings,
which is usually 8? x 11. Anything I've set in the Report's Page
Layout doesn't take. Anyone? I've looked at reportPrintInfo stuff, but
I don't think it's there.

2. Multiple-step operation...-error when manipulating fields w/o source column

3. multiple page/single rec reports & page nums

4. Any 3rd Party Utility for Replication

5. Crystal Reports/SQL 2000 - Reporting from a Stored Procedure with multiple selects (for a sub-report)

6. what tool?

7. Reports, reports, reports, reports.....REPORTS!

8. where can i get vb discompiler?

9. forms and reports problem across different Oracle version

10. MS Access Report Page Numbers

11. How to check number of page in Crystal Report

12. Quick Report Page Number

13. Problems with Reports,PL/SQL and numbering pages