# Configuring Multiple Pages for Reports

You can create multiple pages for reports and link them together by configuring actions on components such as bars in charts, or data in tables.

## Before You Begin

- Build a report.

- Add an additional page to the report.

- To create data sets, build reports, manage reports, and deploy reports to the dashboard, your CommCell user account requires a role with the following permissions: Add Report, Delete Report, Edit Report, Execute Report, Add Datasource, Delete Datasource, Edit Datasource, Query Datasource.

- Your CommCell user account must have an association with the CommCell entity.

For more information on users, permissions, and associations, see User Administration and Security - Overview.

## Procedure

1. From the navigation pane, go to Manage > Integration.

2. On the Developer tools tab, click Report.

3. Next to the Report Name under Actions, click Edit.

4. Configure an action on the default report page:

   1. To configure an action on a column, select a table, then select a column and under Custom Code, in the Cell Expression box, enter a link to the secondary report page:

      For example, to configure the secondary report page to open in a new window when the user clicks on data in a column:

          :=if(cellData != "") {
           return '<a href="reportViewer.jsp?reportId=100&pageName=backupDetails&input.ClientName=' + cellData + '" target="_blank">' + cellData + '</a>';
           }
           else {
           return cellData;
           }

      Where 100 is the numeric identifier assigned to the default report page.

      Where backupDetails is the name configured in the Name box under Page Properties in the secondary page.

      Where ClientName is the input variable configured in the secondary report page.

   2. Optional: View the properties for the chart components. In the On Click box, type console.log(event), and then click on a bar, pie piece, data point, legend, or any area inside the chart.

      The properties for that chart component appear in the browser console.

   3. To configure an action on a bar, pie piece, data point, legend, or entire chart, select the item and on the Properties tab, under Custom Code , in the On Click box, type an expression that opens the secondary report page. The following table lists all properties you can use:

      Property | Description
      --- | ---
      event.data.x | X value for the point where you clicked in the chart.
      event.data.xindex | Index of the X value. For example, the third pie piece displayed in a chart.
      event.data.xlabel | Text label for the X value.
      event.data.y | Numeric value of the Y axis where you clicked in the chart.
      event.data.yindex | Index of the Y value.
      event.data.ylabel | Text label for the Y value.

      For example, to configure the secondary report page to open in a new window when the user clicks on a bar, pie piece, data point, legend, or chart:

          class="codeSnippet">window.open ('reportViewer.jsp?reportId=228&input.AppTypeID=' + event.data.x + '&pageName=clientdetails')

      Where 228 is the numeric identifier assigned to the default report.

      Where clientdetails is the name configured in the Name box under Page Properties in the secondary page.

5. To test the link, click the column, bar, pie piece, data point, or legend where you configured custom code..

   The secondary report page appears in a new tab.

×

Loading...