Partilhar via


CallEvaluateContents Property

Indicates whether the ReportListener should invoke EvaluateContents for all Field controls on a report.

ReportListener.CallEvaluateContents [= nSetting]

Return Value

  • nSetting
    Specifies a setting that indicates the current state of the control.

    nSetting Description

    0 (default)

    The EvaluateContents event code runs for all layout controls if there is code in the class hierarchy for this event.

    1

    The EvaluateContents event does not occur, even if there is code in the class hierarchy for this event.

    2

    The EvaluateContents event always occurs, whether or not there is code in the class hierarchy for this event. This value is primarily intended for users who expect to use BINDEVENT( ) rather than code in the method.

Remarks

Applies To: ReportListener Object.

Visual FoxPro calls EvaluateContents at the beginning of band processing, once for each Field control. Code you write for the EvaluateContents event can change the text, the color, the font, and the alpha display of the Field control. If your report output does not require this text manipulation at run-time, you can turn the EvaulateContents event off for better performance.

Example

If you have a report that changes the pen color of Field controls at runtime in the EvaluateContents event of your ReportListener, you might want to turn the event off if you are printing to a non-color printer. This code example turns off the processing of the EvaluateContents event based on the value of a checkbox.

oReport = CREATEOBJECT("myReportlistener")
IF THISFORM.chkColorPrinter.Value = .F.
oReport.CallEvaluateContents = 1
ENDIF
REPORT FORM (myreportfile) OBJECT oReport PREVIEW

See Also

Reference

EvaluateContents Event
REPORT FORM Command
CallAdjustObjectSize Property
ReportListener Object
BINDEVENT( ) Function