Condividi tramite


How to: Specify Conditional Output for Report Controls

You can specify a logical condition that is evaluated by the report engine to determine whether to render output for a control. If the expression evaluates to False (.F.), output from the control does not display.

For examples of output expressions, see the sample reports Colors.frx and Ledger.frx in the Visual FoxPro ...\Samples\Solution\Reports directory.

To add an output expression to a report control

  1. Open the report or label in the appropriate designer.

  2. In the designer, double-click the control you want.

    The properties dialog box for the report control opens.

    Note

    If the _REPORTBUILDER system variable is not set to the default Report Builder or is set to a third-party builder, the report control dialog box displays or a different dialog box might display. In the report control dialog box, click Print When to open the Print When dialog box. For more information, see _REPORTBUILDER System Variable and Print When Dialog Box.

  3. In the report control properties dialog box, click the Print when tab if it is not selected.

  4. In the Print only when expression is true box, type an expression or build one by clicking the ellipsis () button to open the Expression Builder.

  5. When you are finished, click OK.

For more information, see Print When Tab, Report Control Properties Dialog Box (Report Builder) and Expression Builder Dialog Box.

See Also

Other Resources

Configuring Report Controls