Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Page _ of _
Message
 
À
05/07/2006 10:53:57
Scott Sherman
Puyallup Tribal Health Authority
Tacoma, Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01133843
Message ID:
01133910
Vues:
14
>Is there a report variable for the total number of pages? Better yet, is there some where that the report variables and descriptions are published? Documentation just says backward compatibility, see report designer. Report Designer documentation was very little help too.
>
>'Page ' + alltrim(str(_pageno)) + ' of ' + alltrim(str(??????))

Scott;

I have a parent class for report forms which has this code in a method:

Note: Additional objects such as cntOutput3 are used in this example.

PRIVATE pnPages
pnPages = 0
* This value will be passed to the report to indicate
* the total number of pages....

LOCAL lcFile
* Create a temporary file based on the report to be run...
lcFile = SYS(3) + ".TMP"
REPORT FORM (ThisForm.pReportName) TO FILE (lcFile) NoConsole

* Erase the file-it is no longer needed....
Erase(lcFile)
* Now we have the total number of pages of the report...
pnPages = _PAGENO


DO CASE
* View report on screen...
CASE ThisForm.cntOutput3.opgOutput.Value = 1

REPORT FORM (ThisForm.pReportName) PREVIEW
* Print the report...
CASE ThisForm.cntOutput3.opgOutput.Value = 2
REPORT FORM (ThisForm.pReportName) TO PRINTER PROMPT NOCONSOLE

ENDCASE

Then on your report footer you can place two field objects with the word OF between them:


“Page “ + ALLTRIM(STR(_PAGENO))___ OF pnPages

Tom
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform