phoPreviewContainer - cDRReport¶
Methods - Properties - Events
Type¶
Default¶
0
Arguments¶
None
Description¶
Use this property to tell DataFlex Reports to display the results of the report in an alternative object. Usually, this preview container object contains an object instantiated from the cDRPreviewWindow class.
If the pePreviewStyle property is set to C_DRPREVIEW_VIEW (the default), C_DRPREVIEW_TOOLPANEL, or C_DRPREVIEW_DESKTOPVIEW and this property is zero (default), an object instantiated from the class whose ID is stored in phcPreviewer is created, and the phoPreviewContainer property is set to the ID of the object created.
To display the results from a DisplayReport call in a modal dialog, the pePreviewStyle property is set to C_DRPREVIEW_MODAL, and this property needs to be set to a modal dialog component.
Setting the pePreviewStyle after setting the phoPreviewContainer property clears the phoPreviewContainer property.
DataFlex Framework usage¶
- Windows
- FlexTron (using Windows views)
Sample¶
Use DRModalPreview.dg
Object oReport is a cDRReport
Set psReportName to 'MyReport.dr'
Set pePreviewStyle to C_DRPREVIEW_MODAL
Set phoPreviewContainer to oDRModalPreview
End_Object
Object oRunReportButton is a Button
Set Label to 'Run Report'
Procedure OnClick
// Requires the phoPreviewContainer object to be set to
// a valid object ID for a result.
Send DisplayReport of oReport
End_Procedure
End_Object
Object oReport2 is a cDRReport
Set psReportName to 'MyReport.dr'
End_Object
Object oRunReport2Button is a Button
Set Label to 'Run Report 2'
Procedure OnClick
// Creates a phcPreviewer object and stores the object id
// in phoPreviewContainer
Send DisplayReport of oReport2
End_Procedure
End_Object