Megosztás a következőn keresztül:


How to: Hide an Item (Reporting Services)

Set the visibility of a report item when you want to conditionally hide an item based on a report parameter or some other criteria that you specify.

You can also design a report to allow the user to toggle the visibility of report items based on clicking text boxes in the report, for example, for a drilldown report. For more information, see How to: Add a Visibility Toggle to an Item (Reporting Services).

The following procedures describe how show or hide a report item in a rendered report based on a constant or an expression.

To hide a report item

  1. In Design view, right-click the report item and then click <report item>Properties. The <report item>Properties dialog box opens.

  2. Click Visibility.

  3. In When the report is initially run, specify whether to hide the item when you first view the report:

    • To display the item, click Show.

    • To hide the item, click Hide.

    • To specify an expression that is evaluated at run-time, click Show or hide based on an expression. Type the expression or click the expression (fx) button to open the Expression dialog box, and create the expression in the Expression pane.

      Note

      When you specify an expression for visibility, you are setting the Hidden property of the report item. The evaluated expression shows the report item when the value is False, and hides the report item when the value is True.

  4. Click OK twice.

To hide static rows in a table, matrix, or list

  1. In Design view, click the table, matrix, or list to select it. The Grouping pane displays the groups for the selected data region.

    Note

    If the Grouping pane is not visible, click Grouping on the Report menu.

  2. Right-click the row handle, and then click Row Visibility. The Row Visibility dialog box opens.

  3. To set the visibility, follow steps 3 and 4 in the first procedure.

To hide static columns in a table, matrix, or list

  1. In Design view, select the table, matrix, or list. The Grouping pane displays the groups for the selected data region.

  2. Right-click the column handle, and then click Column Visibility.

  3. In the Column Visibility dialog box, follow steps 3 and 4 in the first procedure.