Passing Page # between reports

Passing Page # between reports

Post by Lee C. Bri » Wed, 21 Dec 1994 02:13:53



I have what I believe to be a simple question about Foxbase v2.6, and
I'm hoping someone knows the answer or can point me to the right place
for the answer.

I have two seperate reports that work off two seperate databases.
What I want to do is pass the number of pages from the first report to
the second report, increment by one, and start printing the second
report with that page number.

The Langauge specification guide talks about a page count variable,
but says it's for backwards compatability only.

Does anyone have any suggestions?

        Lee

+---------------------------+----------------------------------------------+
| Lee C Brink                Office Support Co-ordinator at NPAC           |

|                            315-443-1722                                  |
|                                                                          |
| Please send email to the above address and not to "mailbox.syr.edu"      |
|       I check that account at most once a week                           |
|                                                                          |
| Note: I will post email if appropriate and/or offensive.                 |
|       You have been warned                                               |
+---------------------------+----------------------------------------------+

 
 
 

Passing Page # between reports

Post by Mike Van Wa » Wed, 21 Dec 1994 13:21:31


...snip...snip...

Quote:>I have two seperate reports that work off two seperate databases.
>What I want to do is pass the number of pages from the first report to
>the second report, increment by one, and start printing the second
>report with that page number.

One appraoch you might take is to use functions as report variables. For
instance, you can put a text variable in the page footer. In the "REPORT
EXPRESSION" for that, put something like SAVE_PAGE(). In your function lbrary
(SET PROC TO) put a function called "SAVE_PAGE" which increments a PUBLIC
variable.  In the second report, put another function GET_PAGE() in the
header which would reference the PUBLIC variable, increment it and print it
as the page number.  

Good luck!

= Mike =

Sent from Oregon Telcom

 
 
 

Passing Page # between reports

Post by Marcel Rietve » Wed, 21 Dec 1994 21:09:51


Quote:>I have two seperate reports that work off two seperate databases.
>What I want to do is pass the number of pages from the first report to
>the second report, increment by one, and start printing the second
>report with that page number.

I think I know a solution which works with Foxpro, I am not sure it will
work with Foxbase.

There is indeed a variable called _pageno which should (most of the times,
but because of bugs in 2.6 not always !) be incremented for each printed page.
What you can do is initialize a variable like m.mypagenr, and put in the summary
page of the first report an expression which calls a function. This function
will store the current value of _pageno (last page!) in m.mypagenr.

The expression which displays the pagenumber in the second report should be
calculated like m.mypagenr+_pageno.

Example:

Procedure print_report
private mypagnr

m.mypagenr=0

report form report1 to printer  && calls calc_page()
report form report2 to printer

return

procedure calc_page
m.mypagenr=_pageno
return ""     && Otherwise .T. will be printed in your report !

Good luck

 
 
 

1. multiple page/single rec reports & page nums

I need to add page numbers to a report I am
genertaing from Filemaker Pro 4.  The reports are
for a single record in the database, but they need
to be about 10 pages long and the length will
change depending on the content of the fields.
Putting page numbering in the footer does not work
if the actual layout extends beyond one page.  Can
Filemaker Pro do this?  Does Filemaker 5 do this
if 4 does not? Or do I have to merge my data into
some other tool to do advanced reports like this.
If so, can anybody recommend one?

-Matt

Sent via Deja.com http://www.deja.com/
Before you buy.

2. IFMX/Redhat 6.0 compatability

3. Page Header in Reports on last Page ?

4. Importing a Dump via Data Manager (from UNIX to Windows 2000)

5. VFP6 Report - Column Lines to Page Footer on Last Page

6. Login to Oracle Lite

7. Crystal Reports - Report Title Passing

8. FoxPro on Mac

9. Passing Report Variables from the Master to Detail Reports

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

11. SB+ Report writer reports printing one blank page

12. Report page number across multiple report forms

13. Placing a page break in a report using Report Writer FPW2.6