SET REPORTBEHAVIOR Command and SET() Function (TMM)

Visual FoxPro 9.0 SP2
This page is an addendum to two existing Commands and Functions CHM topics, covering enhancements in SP2.
Back to TMM Index
SET REPORTBEHAVIOR 80..89 | 90..99



Specifies that Visual FoxPro executes report rendering commands (such as REPORT FORM or LABEL FORM) similarly to versions prior to Visual FoxPro 9.0. (Default; behavior unchanged in SP2.)


Specifies that when Visual FoxPro executes a command that requires report rendering, it will use the application specified by the _REPORTOUTPUT system variable to obtain an instance of a ReportListener class to perform the rendering.

CFs commentsChanges in SP2

In RTM or SP1, SET REPORTBEHAVIOR 91 causes a syntax error. In SP2, you can specify any value between 90 and 99 to indicate that you want object-assisted reporting. While the product does not make any distinction within this range of values, your code can use the SET("REPORTBEHAVIOR") function to determine which "level" of enhancement to apply.

The shipping _REPORT* applications do not use this capability, but the use of additional settings from 91 to 99 will allow other extensions to fine-tune their output, from limited to fully-enhanced, as the situation required.

Tip note Tip
The shipping SP2 Report Builder Application provides an example of ways your code can respond to the current reporting environment by checking SET("REPORTBEHAVIOR") before your first preview from the Designer in a development session:
    if oEvent.SessionData.Get("draftwarning") == "hide"
       * do nothing, we've already shown it
       if set("REPORTBEHAVIOR") < 90
          * do nothing
Your code could perform a check such as the following:
    if set("REPORTBEHAVIOR") > 95
       * load a particular GFX object
       * indicate that you are in limited extension mode,
       * whether at designtime or runtime,
       * and will not be displaying this
       * particular GFX's type of enhancement in your
       * "report draft" output

See AlsoSee Also