Freigeben über


CallAdjustObjectSize Property

Indicates whether the ReportListener should invoke AdjustObjectSize for all appropriate layout controls.

ReportListener.CallAdjustObjectSize [= nSetting]

Return Value

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

    nSetting Description

    0 (default)

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

    1

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

    2

    The AdjustObjectSize 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 invokes AdjustObjectSize once for each layout element of type Shape or Picture, unless it finds one of these conditions:

  • If there is no code in the derived ReportListener class at run time

  • If the element is in a band not marked Stretchable (fixed band height)

If your report output does not require dynamic object sizing, you can turn it off for better performance.

Example

The following code example uses CallAdjustObjectSize to optimize reporting speed if a checkbox on a form is checked.

oReport = CREATEOBJECT("myReportlistener")
IF THISFORM.chkNoAdjustSize.Value = .T.
oReport.CallAdjustObjectSize = 1
ENDIF
REPORT FORM (myreportfile) OBJECT oReport PREVIEW

See Also

Tasks

How to: Register Custom ReportListeners and Custom OutputTypes in the Report Output Registry Table

Reference

AdjustObjectSize Event
REPORT FORM Command
BINDEVENT( ) Function
CallEvaluateContents Property