Skip to content

DRModalPreview.dg

When showing a preview of a report, it will normally display a panel that is not modal, i.e., it does not block the rest of the application. For this, the cDRReport class by default uses the cDRPreview class to display the report preview.

However, in some cases, a modal panel is just what the developer needs. For example, when the user must first view and approve the report before being able to continue.

This can be implemented by explicitly using DRModalPreview. To do this, add the following code before calling RunReport:

Set pePreviewStyle of oReport to C_DRPREVIEW_MODAL
Set phoPreviewContainer of oReport to oDRModalPreview

The preview could look like this:

This modal panel is one of five ways to create a Windows report preview. They are:

Any of these can be chosen by setting pePreviewStyle to the desired preview style, as shown in the code example above.