OnPostHTMLPreviewData - cDRReport¶
Methods - Properties - Events
Method Type¶
Procedure (event)
Arguments¶
None
Description¶
This procedure is called from GenerateReportHTML after the report output is stored in a string and passed back to ShowReport.
DataFlex Framework usage¶
- Web
- FlexTron (using web previewer)
Sample¶
Object oReport is a cDRReport
Set psReportName to 'MyReport.dr'
Procedure OnPostHTMLPreviewData
String sReportId sFileName
Integer iChannel
Get psReportId to sReportId
Move (Seq_New_Channel ()) to iChannel
If (iChannel >= DF_SEQ_CHANNEL_MIN) Begin
Get ReportCacheFileName '.log' to sFileName
Direct_Output channel iChannel sFileName
Send LogReportQueries sReportId iChannel
Close_Output channel iChannel
Send Seq_Release_Channel iChannel
End
End_Procedure
Procedure LogReportQueries String sReportId Integer iChannel
String sSubReportId sQuery
Integer iSubReports iSubReport
Get ReportQuery sReportId to sQuery
Writeln channel iChannel '--- ' sReportId
Writeln channel iChannel sQuery
Writeln channel iChannel '---'
Get SubReportCount sReportId to iSubReports
If (iSubReports > 0) Begin
Decrement iSubReports
For iSubReport from 0 to iSubReports
Get SubReportId sReportId iSubReport to sSubReportId
Send LogReportQueries sSubReportId iChannel
Loop
End
End_Procedure
End_Object