Skip to content

OnReportPreviewClick - cDRReport

Methods - Properties - Events

Method Type

Procedure (event)

Arguments

Argument Description
iPos The position of the click in the report. Can be one of the HitTest constants.
iSectionID The value assigned as ID to the section.
sObject Name of the object if iPos is C_drObject.
sInfo Value of the object if iPos is C_drObject.

Description

This procedure can be used to respond to user clicks in the preview. If multiple objects exist with the same name, it is important to set up the reports with unique IDs for each section.

DataFlex Framework usage

  • Windows
  • FlexTron (using Windows previewer)

Sample

Object oReport is a cDRReport
    Set psReportName to 'MyReport.dr'

    Procedure OnReportPreviewClick C_drHitTests iPos Integer iSectionId String sObject String sValue
        If (iPos = C_drObject and iSectionId = 3 and sObject = 'Customer.CustomerId') Begin
            Send OpenCustomerView sValue
        End
    End_Procedure
End_Object

Notes

  • Preview click can only work when there is a window handle available. Up to v8.2, cDRReport generated an error when the window handle was missing; in v8.3, this error can be suppressed by setting pbNoWindowHandleError to true.