GFX Render-Suppression Implementation (TMM)

Visual FoxPro 9.0 SP2
This topic supplies information about a new-in-SP2 FFC VFP Reporting System extension class.
Back to TMM Index
About this class

gfxNoRender conditionally eliminates default rendering behavior for report layout controls by evaluating a ReportListener-referencing expression specified in MemberData.  It has two modes of processing:

  • Render event suppression:  a layout control can be marked to have its memberdata expression evaluated during the Render event. If the expression evaluates to .T., gfxNoRender uses the return value of its ApplyFX method to inform the reportlistener that native rendering should be suppressed.
  • Preprocess  suppression: a layout control can be marked for removal from the FRX if its memberdata expression evaluates to .T. during the LoadReport event.  Note that this behavior is only possible in the SP2 Report Engine; if you mark an object for Preprocess and load gfxNoRender in an earlier build of the base product, it will be suppressed at Render-time, instead. The same switch to Render-time suppression occurs if you are previewing the report from within a Report Designer session; see the CommandClauses TMM docoid for details.

The two processing modes are exposed by the ReportBuilder using two Advanced Properties, #DEFINEd in FOXPRO_REPORTING.H as follows:


The ListenerRef prefix on the names of the two associated Advanced Properties is a convention used in Advanced Properties to denote expressions that have access to a reference to the running reportlistener, accessible as THIS.Listener at the time the expression is evaluated.

FX subsystem elements, such as gfxNoRender, that observe this convention announce their intentions and the availability of this reference by registering Advanced Properties with this prefix. 

Tip note Tip
The ability to have an in-scope reference to the running reportlistener is one significant advantage that gfxNoRender has over a Print When report expression.  The second advantage , in SP2, is the improved performance of handling layout element suppression in a preprocess mode. 

Because the listener reference is in scope and available, you can use an Advanced Property expression to remove some layout controls when the running reportlistener has specific attributes. You might do this if these layout controls  were marked for rotation, since they would not be rendered as rotated in the HTML version of the report, by checking the reportlistener's OutputType property:

THIS.Listener.OutputType = 5            

See AlsoSee Also