Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select page to print
Message
From
20/05/2001 14:55:38
Kam Lee
SUNY-Health Science Center
Brooklyn, New York, United States
 
 
To
20/05/2001 02:29:51
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00509177
Message ID:
00509240
Views:
18
This message has been marked as the solution to the initial question of the thread.
>In allowing my users to select page number to print a report,
>I had tried to obtain the past page number by including
>the following statements in the init event of the form:
>REPORT FORM MyReport TO SCREEN NOCONSOLE
>lastPage = _pageno

>Every time the report is printed. The init event would execute
>the above but the following message appeared:

>"Screen.txt already exists, overwrite it ? Yes/No"

>My Q's are:
>1. Can I get away without this appearing every time the above
>REPORT command is executed?
SET SAFETY command controls whether the VFP will ask you if you want to overwrite it. But if you want to just run it to obtain the last page.
You can just do: REPORT FORM myreport NOCONSOLE.

>2. Where is the best place to put this REPORT FORM NOCONSOLE
>statement so that I don't have to re-generate the past page everytime
>I print the report.
In the dynamic data environment, you may want to get the last page dynamically.
as indicated below.

>3. Is there a more appropriate (or simple) way to obtain the last page
>than the REPORT command ?
I usually do it in 2 report form statements:
report form myreport NOCONSOLE
M.nLastPage=_pageno
report form myreport TO PRINT NOEJECT NOCONSOLE NOWAIT
But there could be a better way, you can look around in the past posts.

Kam.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform