General information
Category:
Reports & Report designer
Environment versions
Network:
Windows 2003 Server
>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
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only