Show Department names rather than Department numbers on report page headers criteria, possibly with a sub report

SUGGESTED

I'd like to be able to see the department name instead of the number in the selected criteria shown in the page header.

Currently I see "From '2' to '3' (inclusive)", or "All", or "1, 3, 4", depending on how or which departments I select to be included. This is very clever but only if the reader knows what the department numbers refer to.

The CRITERIA fields don't appear to offer a way to display the name instead.

I created a sub report with criteria that worked within the Report Designer showing only the department names for the selected departments, but when running the main/parent report, the department selection criteria were not passed to the sub report and all department names were displayed irrespective of which ones were selected.

Is there a way to pass the main report CRITERIA to the sub report, or display DEPARTMENT.NAME?

Parents
  • 0
    SUGGESTED

    It's feasible but not obvious/simple.

    In your sub report you need to add a criteria for DEPARTMENT.NUMBER. Then back in the parent report select the sub report and open the criteria property. NOTE: This is the criteria property for the sub report and NOT the criteria property of the main report so selecting the sub report first is important, otherwise you will likely open the wrong dialog. In the criteria dialog you should see one criterion called DEPARTMENT_NUMBER. Select this and click Edit. In the expression editor enter the value CRITERIA.DEPARTMENT_NUMBER_FULL and click OK, and then OK again on the criteria dialog.

    There is an overhead to a sub report but in this example it is unlikely to cause a significant performance issue provided the sub report is in the report header as that way it is only ever run once.

    Hope that helps

Reply
  • 0
    SUGGESTED

    It's feasible but not obvious/simple.

    In your sub report you need to add a criteria for DEPARTMENT.NUMBER. Then back in the parent report select the sub report and open the criteria property. NOTE: This is the criteria property for the sub report and NOT the criteria property of the main report so selecting the sub report first is important, otherwise you will likely open the wrong dialog. In the criteria dialog you should see one criterion called DEPARTMENT_NUMBER. Select this and click Edit. In the expression editor enter the value CRITERIA.DEPARTMENT_NUMBER_FULL and click OK, and then OK again on the criteria dialog.

    There is an overhead to a sub report but in this example it is unlikely to cause a significant performance issue provided the sub report is in the report header as that way it is only ever run once.

    Hope that helps

Children