Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
System Variable for Total No. of Pages?
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00507933
Message ID:
00508453
Views:
19
>>>Chuck,
>>>
>>>The accepted way is to print the report first to a file, get the total pages, then print to paper. So if you use a variable TotalPages it your report it would look like this:
>>>
REPORT FORM MyReport to FILE TempRept.prn NOCONSOLE
>>>TotalPages = _PageNo
>>>DELETE FILE TempRept.prn
>>>REPORT FORM MyReport TO PRINT NOCONSOLE
>>>
>>>It doesn't take long to print to the file and it gets you the right number of pages.
>>
>>To add to this suggestion ... if you want to use the PROMPT clause so the user can choose the printer instead of going to the default printer, make sure you do it this way instead:
>>
>>>
>>=SYS(1037)
>>REPORT FORM MyReport to FILE TempRept.prn NOCONSOLE
>>TotalPages = _PageNo
>>DELETE FILE TempRept.prn
>>REPORT FORM MyReport TO PRINT NOCONSOLE
>>
>>
>>Otherwise, you may have an issue with the printable area being different between the default printer and the one chosen by the user. That could potentially mean that the "TO FILE" report would have a slightly different page count than the "TO PRINT" report because the number of lines that can fit on the page may be slightly different.
>>
>>Cathy
>
>Uggggh: After compiling yesterday afternoon, user complains this morning of not being able to choose how many copies to print. I ran it myself and verified that the SYS(1037) print dialog does not offer to let you specify number of copies. Is there a way to accomplish this? Would appreciate any help.
>
>TIA,
>Chuck


Chuck,

There's no simple way. You could create a dialog that prompts for number of copies and then either call the report that many times or you could manipulate the content of the EXPR field in the first record of the .frx file. It stores the number of copies there so you could change it and then run the report. Neither way is quick and simple.

The other thing you might want to look into is Markus Egger's GenRepoX utility. It might have the ability to do this as well as a bunch of other things. It's probably available thru the UT somewhere or thru his EPS website.
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Previous
Reply
Map
View

Click here to load this message in the networking platform