## Track 1: Self-service dashboard with JReport

JDashboard is a new way of information delivery, using a user portal user interface rather than a web report or page report. Users can create, edit and browse dashboards from the JReport Console using JDashboard. With pre-built library components, users can freely choose the objects they want to display in the dashboard, without having to know how these objects were created, what data sources to use, what styles to set, etc. A dashboard can hold multiple library components so that when browsing the dashboard users are able to see multiple data aspects. Within a dashboard, library components are able to communicate with each other via the message mechanism. This allows actions such as common filters to be applied to all the components of a dashboard even when coming from different data sources.

- Task 1: Create a dashboard and insert library components
- Task 2: Clicking on a pie chart legend will automatically update the crosstab (delivering messages between components)
- Task 3: Insert a report component into dashboard
- Task 4: Use a slider to filter on quantity
- Task 5: Insert a third party gadget (stock widget)
- Task 6: Export the library components
- Task 7: Use the configuration panel to change parameters
- Task 8: Share parameters among components
- Task 9: Insert a Visual Analysis component into dashboard
- Task 10: Run a report in JDashboard
- Task 11: Set JDashboard as the server home page

Note: A JDashboard license for JReport Server is required in order to perform this track. If you do not have the licenses, please contact your Jinfonet Software account manager to obtain it first.

### Task 1: Create a dashboard and insert library components

1. On the JReport Console > Resources page, click New > Dashboard on the task bar. JDashboard window will be displayed and a blank dashboard created.

2. Click on the toolbar to display the Resources panel which lists all the data resources and components that can be inserted in dashboards, then go to Component Library > Public Components > SampleReports and drag Sales by Category.lc to the dashboard body.
3. Drag Crosstab.lc in the same folder to the right of the first component.
4. Click on the top right of the Resources panel to hide the panel.
5. Click the Arrange button on the toolbar to align the two library components.

6. Click the Save button on the toolbar to save the dashboard. In the Save As dialog, replace the File Name Dashboard 1 with Products in the File Name text box, and click OK.

### Task 2: Clicking on a pie chart legend will automatically update the crosstab (delivering messages between components)

This task shows the case of sending a filter message from one library component to another.

1. Click a value in the legend of the chart, for example, Bold, and you will see the chart and the crosstab are filtered to show only this category.

2. Click on the toolbar to save the dashboard.

### Task 3: Insert a report component into dashboard

Report components created from business views can be inserted in dashboards directly.

1. Click on the toolbar to display the Resources panel, then go to Reports > Public Reports > SampleReports, expand ShipmentStatus.wls and drag TableComp to the dashboard body below the existing components. Hide the Resources panel.
2. Click on the toolbar to align the three library components.

3. Save the dashboard.

### Task 4: Use a slider to filter on quantity

1. Click on the toolbar to display the Resources panel. From the Toolbox node, drag Slider to the dashboard body below the chart.
2. In the Insert Slider dialog, input Sales Quantity in the Title text box. Choose Range of Values as the slider type.
3. In the Select Fields box, you will see two business views that are used by the inserted three data components. The WorldWideSalesBV has the Quantity field while the other doesn't. We will select the Quantity field so that the data components using the WorldWideSalesBV will be able to respond to the slider. Then click OK.

4. Hide the Resources panel.
5. In order to filter a range of records using a slider component (500-800), on the slider component, remove the checkmark from the All checkbox. Drag the left arrow to set a minimum range (500). Additionally, drag the right arrow to set a maximum range (800).

6. Save the dashboard.

### Task 5: Insert a third party gadget (stock widget)

1. Click on the toolbar to display the Resources panel, scroll down and drag a URL Frame component from Toolbox to the dashboard body below the slider.
2. The Insert URL Frame dialog is displayed. In the Title text field, input My Stocks.
3. In the URL text box, type in the URL http://edulifeline.com/includes/stocks_widget/. Then click OK.

4. The specified web page will be inserted into the dashboard.

5. Hide the Resources panel and save the dashboard.

### Task 6: Export the library components

1. Click the Export button on the toolbar to access the Export dialog. Then select Customize Layout from the Layout drop-down list.

   By default, all the exportable library components are arranged using a tabular style according to their positions in the dashboard in the design panel (right hand side). Each tabular cell can hold no more than one component. There are two blank cells to the right of the crosstab where the slider and the gadget reside. Sliders and gadgets cannot be exported so they are not available here.

   We will remove the chart on the right of the table and add it below the crosstab.

2. In the design panel, scroll to the right. The Sales by Category chart will appear. Right-click anywhere in the cell containing the pie chart, select Remove from the shortcut menu. The chart library component will be removed.

3. Expand the first cell holding the table horizontally by selecting the cell border and dragging border to the right. Drag until the Year column is visible.

4. Split the cell holding the crosstab into two vertical cells by selecting the cell containing Sales Crosstab and clicking the button Vertical Split on the toolbar, then drag the ChartObject from the Resources box to the lower cell.

5. You may find that the table shows a template instead of real data. By default tables and crosstabs are limited to show only the data displayed in the dashboard. If you want the full table data to be exported, right-click in the cell holding the table, select Filter from the shortcut menu, click the All filter, and click OK.
6. Click the View tab to preview the layout.
7. You can save the layout if you are going to reuse it. Click on the toolbar, in the Save As dialog, type Layout1 in the Name text box and click OK. You will see that Layout1 is added in the Layout drop-down list and selected as the value.
8. Click in the Export dialog to do final setting and then start exporting. In the Export dialog, click OK. The exporting process will begin.

9. When finished, close the Export dialog by clicking in the upper right corner.

### Task 7: Use the configuration panel to change parameters

When a component uses parameters, you can make use of the configuration panel to change the parameter values.

1. On the table, TableComp, place your mouse anywhere on the title bar, click the Options button that appears on the title bar, select Edit Setting from the drop-down list to display the parameters.

2. We will change the Shipper. Click to display the Enter Values dialog. Uncheck the All option. Select UBS Uniform Logistics and click to add it to the right box. Then click OK.

3. Click OK in the configuration panel. The table result is then changed based on the parameter value.

4. Save the dashboard.

### Task 8: Share parameters among components

When two or more library components in a dashboard contain parameters that meet the following cases, the parameters can be shared among components. After sharing parameters, we just need to provide values to one group of the parameters and all related components will be able to receive them.

- The numbers of the parameters in each library component are the same.
- According to the parameter order in each library component, the orders of the parameter data types are the same. For example, the parameter data types in a component are String, Number, and Boolean. If there is another component in which the parameter data types are also String, Number, and Boolean, the two components fulfill the condition of the same parameter data types.
- It is up to users to make sure the to-be-shared parameters contain some common values.

The following example illustrates two components sharing similar parameters.

1. Click on the dashboard title bar to add a new dashboard. A new tab will be created, labeled Dashboard 1 .
2. Click on the toolbar to display the Resources panel, expand Component Library > Public Components > SampleReports and drag Count Shipment by Ship Type.lc and Count Shipment by Territory.lc one by one to the dashboard body. Hide the Resources panel. Click the Arrange button on the toolbar to align the two library components.

3. Click on the toolbar and select Share Parameter. The displayed dialog shows that the two library components have shared parameters. Then click OK.

4. Click on the toolbar to display the Enter Parameter Values dialog. The Count Shipment by Ship Type and Count Shipment by Territory components match parameters. Both components share the same number of parameters and both share the same data type of parameters. Parameter 1 and 2: Start Date/End Date (parameter) = Date (data type) for both components. Parameter 3: Territory/Shipper (parameter) = Text (data type) for both components. If the number of parameters are the same and the data types are the same, two different components can share the same parameters. Exit the Enter Parameter Values dialog.

5. We will unshare the parameters between the two components to see how many parameters we need to specify. Click on the toolbar and select Share Parameter. In the displayed dialog, select either component and click the Cancel Share button. Then click OK.
6. Click on the toolbar to access the Enter Parameter Values dialog again. Now it lists separate pairs of the Start Date, End Date, and Territory/Shipper parameters used by the two library components. Click Cancel to exit the dialog.

7. Click on the toolbar to save the dashboard. In the Save As dialog, change the File Name from Dashboard 1 to Shipment and click OK.

### Task 9: Insert a Visual Analysis component into dashboard

1. Keep the Shipment dashboard active.
2. Click on the toolbar to display the Resources panel, then go to Reports > Public Reports > SampleReports, expand VA Analysis.va and you will find a VCTObject under it. Drag the VCTObject into the dashboard body.

3. Save the dashboard.

### Task 10: Run a report in JDashboard

1. Keep the Shipment dashboard active.
2. Click on the toolbar to display the Resources panel, then go to Reports > Public Reports > SampleReports and drag Coffee Sales.wls to the dashboard body. Hide the Resources panel.
3. The report will be loaded into a separate tab, labeled Coffee Sales. Coffee Sales appears the same in JDashboard as it would appear in Web Report Studio.

### Task 11: Set JDashboard as the server home page

Keep the JDashboard window open and we will continue from the task 10. There is currently a browser session open from JReport Server console and a popup window containing JDashboard.

1. In your browser, change from the JDashboard popup or floating window back to the JReport Server Console (ALT + tab in your browser window).
2. On the JReport Console page, click Profile on the system toolbar, then Customize Server Preferences on the task bar. In the General tab check the option Use JDashboard as Server User Console Home Page, then click OK. Click OK in the prompt message.
3. Click Resources on the system toolbar. In the Name column, click My Reports. Click Shipment.dsh in the folder to open the dashboard which will be loaded into a new JDashboard window so that the setting in step 1 can take effect in JDashboard.
4. In the new JDashboard window, click on the toolbar and you will see Set as Server Home is enabled on the menu list. Click the option to set JDashboard with the Shipment dashboard active as the server home page.
5. Refresh the JReport Console page and a Home tab will be available beside the Resources tab on the system toolbar. Click the Home tab and you can access the Shipment dashboard immediately.

### Track 1 summary

In this track, we first created a dashboard by inserting two library components, a report component, a slider, a third party gadget, and a Visual Analysis component, and performed operations in the dashboard such as delivering the filtering message predefined between two library components, filtering the data using the slider, exporting the library components, changing parameter values via the configuration panel, sharing component parameters, setting JDashboard as the server home for easier access, and running a report in JDashboard.