OnProgressRecordsRead - cDRReport¶
Methods - Properties - Events
Method Type¶
Procedure (event)
Arguments¶
| Argument | Description |
|---|---|
iRecords |
The amount of records to read. |
Description¶
This procedure can be used to display how many records have been read so far. This information can be shown on a status panel.
This event is executed once for every 100 records.
In the integration library for version 6 and later, the cDRReport class contains code to display the status text. If a different class that does not include a SetStatusText procedure is used for the status panel, it is necessary to add code as 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 OnProgressRecordsRead Integer iRecords
Handle hoStatusPanel
Forward Send OnProgressRecordsRead iRecords
Get phoStatusPanel to hoStatusPanel
Send DisplayMyStatusInformation of hoStatusPanel ("Records read:" * String(iRecords))
End_Procedure
End_Object
The above example is for Windows GUI applications. For web-based applications, it is more common to use code like this:
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