Export (0) Print
Expand All

How to: Apply Conditional Visibility Controls

Microsoft Dynamics Nav 2009

Some reports have sections that are printed conditionally. For example, if the request form for the report has a Show Address Details check box, then the address details are printed only if the check box is selected. As another example, a report could show data based on a value such as a balance. If the balance is 0, then the report does not show the balance. In the Classic report layout, you can use section triggers to specify the conditions for showing the data. In a client report definition (RDLC) report layout, section triggers are not supported. To specify conditional visibility in an RDLC report layout, use an expression on the Visibility property of the control or table row.

For an example of applying conditional visibility controls to hide nonfiltered headers, see How to: Hide Nonfiltered Headers.

Before you begin this procedure, you must create a layout suggestion for the report. For more information, see How to: Create a Layout Suggestion.

To transform conditional visibility controls

  1. In the Classic client, on the Tools menu, click Object Designer.

  2. In Object Designer, click Report, select the report that you want to modify, and then click Design.

  3. On the View menu, click Layout.

  4. In Visual Studio, in the Report.rdlc file, select the control or table row that you want to show conditionally.

  5. On the View menu, click Properties Window.

  6. In the Properties window, expand Visibility.

  7. Under Visibility, in the Hidden field, select <Expression…> from the drop-down list.

  8. In the Edit Expression window, enter the conditional statement for when the control or row is hidden, and then click OK.

    The following illustration shows an example of a conditional visibility expression on report 2, General Journal - Test, in the standard application.

    Dd354976.Local_-410735417_nav_plat_report2_conditionalvisibility(en-us,NAV.60).png

See Also

Community Additions

ADD
Show:
© 2014 Microsoft