Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_Pagetotal error
Message
 
To
25/07/2023 08:20:14
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
01686828
Message ID:
01686837
Views:
52
>>Why include RANGE when you're specifying the whole report?
>>
>>Because printer dialog always has the option of "Pages: 1-65534". I want to change 65534 to actual total pages.
>
>You'd have to run the report invisibly first, to let the report calculate the _pagetotal.

I don't think you should run the report more than once. VFP do this for you when _pagetotal is in the report.
CREATE CURSOR Test (Fld1 I, Fld2 C(30))
FOR lnFor =1 TO 300
    INSERT INTO Test VALUES (lnFor, REPLICATE("A",lnFor))
NEXT
IF NOT FILE("Test.FRX")
   CREATE REPORT Test FROM Test
ENDIF
MODIFY REPORT Test && Add _pagetotal somewhere
REPORT FORM Test NOCONSOLE TO PRINTER PROMPT PREVIEW
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform