Add support for what export options are available through option dialogs¶
What is new - 24.0¶
The integration library contains three modules that can be used in a DataFlex application to let the end-user select an export of the report:
- ExportReportDialog.wo (Web Desktop)
- ExportReport.wo (Web Drilldown)
- DRExportOptions.dg (Windows)
The options in the export choices pull-down can now be controlled by properties of the cDRReport object. The following properties are available:
| Property | Windows | Notes | Web | Notes |
|---|---|---|---|---|
| pbShowExportToCSV | ||||
| pbShowExportToHTML | Yes | - | Yes | |
| pbShowExportToImage | Yes | - | - | Is controlled by export to GIF, JPEG, PNG, and TIFF |
| pbShowExportToPDF | Yes | - | Yes | |
| pbShowExportToRTF | Yes | - | Yes | |
| pbShowExportToXLS | ||||
| pbShowExportToXLS | ||||
| pbShowExportToTIFF | ||||
| pbShowExportToJPEG | ||||
| pbShowExportToPNG | - | Yes | ||
| pbShowExportToTIFF |
The DRExportOptions.dg automatically reduces the number of options based on the properties.
The ExportReportDialog.wo and ExportReport.wo require sending CopyExportOptions prior to opening the modal dialog or view. The code for that is:
Send CopyExportOptions of oExportReportWebView (oReport)
This can be inserted in the OnClick (or any other) event that lets the user navigate to the export options page.
Example:
Object oExportReportMenuItem is a cWebMenuItem
Set psCaption to "Export Results"
Set psTooltip to "Select Export Options"
Set peActionDisplay to adMenu
WebRegisterPath ntNavigateForward oExportReportWebView
Procedure OnClick
Send CopyExportOptions of oExportReportWebView (oReport)
Send NavigatePath
End_Procedure
Procedure OnNavigateBack Handle hoCallback tWebNavigateData NavigateData
Send ExportReportToDownloadURL of oReport NavigateData.NamedValues
End_Procedure
End_Object
And for the modal dialog:
Object oExportButton is a cWebButton
Set psCaption to "Export Report"
Set piColumnSpan to 3
Procedure OnClick
Send CopyExportOptions of oExportReportDialog (oReport)
Send Popup of oExportReportDialog Self
End_Procedure
Procedure OnCloseModalDialog Handle hoModalDialog
tWebNavigateData ExportOptions
Get ExportChoices of hoModalDialog to ExportOptions
Send ExportReportToDownloadURL of oReport ExportOptions.NamedValues
End_Procedure
End_Object