Formatting Empty Tables or Lists

An issue that must be addressed is that of blank lists, tables, and crosstabs in a report. If the primary container returns no data, then using the No Data Contents property of the container will inform the user that they have chosen prompt values that yield no data. The second situation is when you have a sub-table or list in a report and it has no data in it when the report is run. What you see is a header and nothing else.

About this task

In the following example we have a report that displays entity information and in the list footer we display a list of issues attached to that entity. When we first run the report we see the following, shown in Figure 1:

Figure 1. Blank Section Shown
List showing some blank sections

What we see is that in the first section there is an issue listed, but in the second and third sections, there is no data found and the header of the list appears.

Procedure

  1. Using the Condition Explorer, complete the following steps.
    1. Create a new Boolean Variable.
    2. In the Boolean variable, enter the following formula:
      [Issue].[IS_ISSUE_ID] is missing or
      [Issue].[IS_ISSUE_ID] is null
      
    3. Click OK.
    4. In the Properties pane, under Miscellaneous, set the Name property to Hide Titles.
  2. In the main report page, complete the following steps.
    1. Select a list header in the issue list.
    2. Using the ancestor selector, select List Columns Title Style.
    3. In the Properties pane, under the Conditional section, set the Style Variable to Hide Titles.
  3. In the Condition Explorer, complete the following steps.
    1. Select Yes under the Hide Titles variable.
    2. In the Properties pane, in the Box section, set the Box Type to None.
  4. Run the report.

Results

What you now see, shown in Figure 2, when you run the report is that the list header title has been removed when there are no data items in the list.

Figure 2. Hiding Blank List
List that does not include blank sections