Trigger different dashboard when hierarchy is clicked

Contents[Hide]

1. Overview

This article shows you how to trigger different dashboards when the chart or table is clicked on the hierarchy or row header. This is useful when you want to display different reports, instead of using one dashboard for the hierarchy. To be able to do so, a landing page is used to filter the value passed from the unique name of the table. Scripts are also used to navigate the filter in the landing page to a different dashboard.

2. Getting Started

Let us use a sample dashboard from a hotel database with the region and the overall rate of the hotels in the region.

Sample Table
Sample Table

Our objective is to drill down the elements of the hierarchy by navigating it to a new dashboard. However, we want to display the elements in different dashboards.

For the Asia region, we want to direct this to one dashboard when clicked.

Asia Region Table
Asia Region Table
 

For the North America region, we want to direct this to another dashboard when clicked.

North America Table
North America Table
 

3. Creating a landing page

To design the landing page, create a new dashboard, and place a table in the dashboard with the hotel region in it.

Sub Dashboard with Region Table
Sub Dashboard with Region Table

Take note of the unique name of the table. To learn how to find the unique name, go to the article on setting filter value by script.

Create a hieararchy parameter filter, and connect the parameter values using the table.

Adding Filter in Dashboard
Adding Filter in Dashboard

Connecting Region to the Filter
Connecting Region to the Filter

Select the table, and on Properties > Layout > Common, select Hidden

Hidden Property for Table
Hidden Property for Table
 

Once this is viewed, it will only show the filter, with the values from the hidden table.

Filter Showin on Landing Dashboard
Filter Showin on Landing Dashboard
 

Edit the dashboard, and in Properties > Main > Actions > Ready, add a script, and place this in the Script Editor:

var values = parameterHierarchy1.control.parameterValue.values[0].uniqueName;

if (values == "2.B.hot_ID"){  //value for "Asia"
  var nav = new dundas.view.NavigateAction();
  nav.actionTarget = dundas.view.ActionTarget.NEW_WINDOW;
  nav.navigateType = dundas.view.DataActionNavigateType.URL;
  nav.targetUrl = "http://philipa:8107/Dashboard/4a6e240b-9200-4381-bf18-eeea6e4e442b";
  nav.execute(new dundas.view.ActionEventArgs());
}
else if (values == "1.B.hot_ID"){ //value for "North America"
  var nav = new dundas.view.NavigateAction();
  nav.actionTarget = dundas.view.ActionTarget.NEW_WINDOW;
  nav.navigateType = dundas.view.DataActionNavigateType.URL;
  nav.targetUrl = "http://philipa:8107/Dashboard/2209a26a-9e24-437d-b79a-bc57771c2784";
  nav.execute(new dundas.view.ActionEventArgs());
}
else
{
  null;
}

Landing Dashboard with Script Editor
Landing Dashboard with Script Editor

4. Updating the main dashboard

On the main dashboard, select the dashboard, and go to Set Up Interactions > Drill Down

Drill Down Interaction
Drill Down Interaction

In "Set up a drill down" dialog box, set "The drill down should" dropdown to "Show a different view" and the "The drill-down should open" dropdown to "In a new window". Select the landing dashboard as the dashboard to land.

Setting Up Drill Down Interaction
Setting Up Drill Down Interaction

Landing Dashboard Selection
Landing Dashboard Selection

Once the dashboard has selected, click on "Set up parameters..." and under "Current Parameter Mappings", select the value to edit.

Current Parameter Mappings
Current Parameter Mappings

Under the source and target dashboard, select the filter value in the Source section, and "viewParameter1" in the Target section.

Selecting Source and Target Parameter
Selecting Source and Target Parameter

Submit the changes, and View to check on the results.

Initial Click on the Drill Down
Initial Click on the Drill Down

Tabs Showing Main, Landing and Target Dashboards
Tabs Showing Main, Landing and Target Dashboards

5. See also

Dundas Data Visualization, Inc.
500-250 Ferrand Drive
Toronto, ON, Canada
M3C 3G8

North America: 1.800.463.1492
International: 1.416.467.5100

Dundas Support Hours: 7am-6pm, ET, Mon-Fri