OnProgressFormatPage - cDRReport¶
Methods - Properties - Events
Method Type¶
Procedure (event)
Arguments¶
| Argument | Description |
|---|---|
iPage |
The pages currently being formatted |
iTotalPages |
The total number of pages to format |
Description¶
This procedure can be used to display how many pages are formatted so far. This value can be displayed on a status panel.
The event is executed once every 50 pages.
In the integration library for version 6 and later, the cDRReport class contains code to display the status text. When a different class that does not contain a SetStatusText procedure is used for the status panel, it is necessary to add code like shown in the sample below.
DataFlex Framework usage¶
- Web
- Windows
- FlexTron
Sample¶
Use DRStatusPanel.Dg
Object oReport is a cDRReport
Set psReportName to 'MyReport.dr'
Set pbShowStatusPanel to True
Set phoStatusPanel to oMySpecialStatusPanel
Procedure OnProgressFormatPage Integer iPage Integer iTotalPages
Handle hoStatusPanel
Forward Send OnProgressFormatPage iPage iTotalPages
Get phoStatusPanel to hoStatusPanel
Send DisplayMyStatusInformation of hoStatusPanel ("Pages formatted:" * String(iPage))
End_Procedure
End_Object
The above example is for Windows GUI applications. For web-based applications, it is more common to use code as:
Object oRunReportMenuItem is a cWebMenuItem
Set psCaption to "Print Invoices"
Set psTooltip to "Print the invoices using the selections"
Set psCSSClass to "RWPrintReportButton"
Procedure ConfirmResponse Integer eConfirmMode
If (eConfirmMode = cmYes) Begin
Send GenerateReport of oReport
End
End_Procedure
WebPublishProcedure ConfirmResponse
Procedure OnLoad
Forward Send OnLoad
Send SetActionMode (RefProc(ConfirmResponse)) scModeProgress "Please wait for report results to be generated and downloaded to the viewer..."
End_Procedure
End_Object