Skip to content

DRString - cDRReport

Methods - Properties - Events

Method Type

Function

Return Type

String

Arguments

Argument Description
sValue String value to be used inside the compare expression that is built.

Description

Returns a string containing a call to the CStr conversion function available in the function expression evaluator.

DataFlex Framework usage

  • Web
  • Windows
  • FlexTron

Sample

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

Object oRunReportButton is a Button
    Set Label to 'Run Report'

    Procedure OnClick
        String sReportId sCompare sFunction

        Get OpenReport of oReport to sReportId
        If (sReportId <> '') Begin
            Get DRString of oReport 123 to sCompare
            Move ('return ({product.code} = ' + sCompare + ')') to sFunction
            Set psFilterFunction of oReport sReportId to sFunction
            Send OutputReport of oReport
            Send CloseReport Of oReport sReportId
        End
    End_Procedure
End_Object

Notes

  • The result of this function cannot be used with the psFilterValue property or the AddFilter method and is written specifically for the psFilterFunction operation.
  • Filter value offloading to a server or index cannot be done if functions are used inside the psFilterFunction; it is better to use the string value directly in the expression.