Lesson 2: Creating a Web Report Using Wizard
In this lesson, we will create a web report using the Web Report Wizard, which is using the traditional way of Web Report Studio. The report will contain these data components: a crosstab, a table, and a banded object. After the report is created, we will use the powerful analysis features of Web Report Studio to analyze data in each component.
This lesson contains the following tasks:
- Task 1: Create a Web Report Using Wizard
- Task 2: Work with the Crosstab
- Task 3: Work with the Chart
- Task 4: Work with the Table
- Task 5: Work with the Banded Object
- Task 6: Apply a Filter
Task 1: Create a Web Report Using Wizard
- In the Logi JReport Server Start Page, select My Profile in the Manage category.
- In the My Profile > Customize Server Preferences > General tab, select the Yes checkbox for Use Wizard for Web Report Studio. select OK to save the setting. Then in the prompt message box, select OK.
- Select Resources on the system toolbar to switch to the page, then go to the Public Reports > SampleReports folder.
- Select New > Web Report on the task bar.
The Web Report Wizard appears.
- In the Page screen of the wizard, the Blank template is selected by default. Input Sales Performance in the Label text box and then select Next.
You can also select from the other two templates if you want, with which you can customize the company logo and company name.
- In the Layout screen, select the T-Style layout. In the first row, select the Select here to select component link in the left cell and select Crosstab from the drop-down menu. Select Table for the right cell and Banded Object for the bottom row.
- Select Next to go to the Bind Data screen to define data for the three components one by one. First define the crosstab: from the Data Source drop-down list, select WorldWideSalesBV in Data Source 1, add Region to the Columns box, Sales Month to the Rows box, and Total Sales to the Summaries box.
- Select Next to define the table: keep the business view in the Data Source text box unchanged to use the same data source as the crosstab, in the Details tab add these fields: Product Name, Order Date, and Total, then select the Group tab and add Country as the group-by field.
- Select Next to define the banded object: keep the business view in the Data Source text box unchanged to use the same data source as the crosstab, in the Details tab add these fields: Order ID, Product Name, Quantity, Unit Price and Total, then select the Group tab and add Country as the group-by field.
- Select Next to display the Style screen and select Logi JReportDemo as the style.
- Select Run. The report is opened in Web Report Studio.
- Select the Save button on the toolbar.
- In the Save As dialog, type SalesPerformance.wls in the File Name text field, then select OK to save the web report into the Public Reports > SampleReports folder in the server resource tree. select OK in the prompted message box.
Task 2: Work with the Crosstab
Groups on the crosstab row and column headers can be easily changed using the Switch feature. We will change the row header to analyze data by quarter.
- Right-click the row header and select Switch Row > Sales Quarter from the shortcut menu. The row header now displays quarters:
Next we will use the Go feature to analyze data from different views. Let's try Go-to-by-Value first, which allows to go to another group based on the current value.
- Right-click 2015-Q1 in the row header, select Go to by Value > Category from the shortcut menu. The crosstab refreshes to show the total sales of each product category in the first quarter of 2015 in different regions.
Next we will use Go-Up and Go-Down to drill data in higher and lower group levels. To use these two functions, you need to make sure the business view used to create the report has predefined hierarchies, so that you are able to go up and down between the group levels in the hierarchies.
- Right-click on the row header and select Go Up > Product Type from the shortcut menu.
The crosstab changes to:
Now we will go down from Product Type to Category, however it is not simply a reversed process of going up from Category to Product Type. When you go down to a lower group level, Logi JReport will apply the currently selected value as a filter condition to show its data in the lower group level only.
- Right-click Regular and select Go Down > Category from the shortcut menu. The crosstab refreshes to show the total sales of the regular categories in the first quarter of 2015 in different regions.
Crosstab can be converted to chart and vice versa. Next we will use chart to display the data in the current crosstab.
- Right-click the blank cell in the intersection of the crosstab row and column headers, then select To Chart from the shortcut menu.
- In the To Chart dialog, the data fields used in the crosstab are listed. We will define the chart based on these fields. Keep the default chart type as Clustered Bar 2-D, add Total Sales to the Bar Length box, Category to the X-Axis box and Region to the Clustering box as follows:
- Select OK to generate the chart. Then drag the chart bottom border to enlarge its height. The total sales of the regular categories in the first quarter of 2015 in different regions now displays in the chart as follows:
- Select on the toolbar to save the report.
Task 3: Work with the Chart
We will continue to perform on the chart that is converted from the crosstab in the previous task. First we want to exchange the fields on the category and series axes.
- Select the Swap Chart Groups button on the toolbar. The chart changes as follows:
Next we will change the chart type to analyze data in line chart.
- Select the Chart Type button on the toolbar, then from the drop-down menu select Line > Line 2-D.
From the line trend we can easily figure out the change of the category total sales across the regions. You can put the mouse pointer on any line node to get the detailed data it represents in the chart.
A summary in a report can be linked to a specific detail table. Now we will use this feature to view the detailed information of each chart value.
- Right-click the highest node and select Go to Detail from the shortcut menu.
The detail table of the Bold category's total sales in Europe, Middle East, Africa shows as follows:
The default detail table contains all the group and detail fields in the same business view category as the aggregate field from which the summary of a report is created. In our case, the default detail table does not satisfy our requirements, so next we will edit the detail table manually.
- Select the Back button on the toolbar to return to the main report.
- Right-click any node in the line chart and select Edit Detail Table from the shortcut menu.
- In the Resources box of the Edit Detail Table dialog, all the group and detail fields in the business view used by the chart are listed. Add these fields to the right box to display in the detail table one by one: Customer Name, Discount, Quantity, Unit Price and Total. Select OK to finish editing the detail table.
- Right-click the highest node again and select Go to Detail from the shortcut menu. The detail table now shows as follows:
- Select on the toolbar to return to the main report.
- Select on the toolbar to save the report.
Task 4: Work with the Table
We want to add some fields into the table to get more order information. We will add a detail column to show order quantity and add another group to group the table by sales year first and then country.
- Select the table. Then from the Resources panel on the left, drag Quantity to the right border of the Order Date column and release the mouse when an orange line appears.
The table now displays as follows:
Next we want to sort the table by the order dates in descending order.
- Put the mouse pointer over the Order Date column header, the sort icon appears.
- Select the down arrow to sort the dates in descending order.
Now we will summarize the order total in each group.
- Right-click any value in the Total column, then select Aggregate On from the shortcut menu.
- In the Aggregate On dialog, set the function to Sum and select OK.
We can see the order total in each country is added in the group header.
This operation also creates a dynamic aggregation which is given a default name Sum_Total. You can find it in the Dynamic Resources > Aggregations list in the Resources panel and you can use it again in the report.
Lastly we will use the Conditional Format feature to highlight the orders the quantity of which are equal to and larger than 1500.
- Right-click any value in the Quantity column and select Conditional Formatting from the shortcut menu.
- In the Conditional Formatting dialog, select above the Condition box.
- In the Edit Conditions dialog, select Current Field from the field drop-down list, >= from the operator drop-down list, then in the value text box input 1500. Select OK to finish editing the condition and return to the Conditional Formatting dialog.
- Select the color image ahead of the Background Color text box and select the yellow color #FFCC00 from the color palette. Select OK to apply the conditional format setting.
The table refreshes to display as follows:
- From the Resources panel on the left, drag Sales Year above the Australia group, release the mouse when an orange line appears.
The table refreshes as follows:
- Select on the toolbar to save the report.
Task 5: Work with the Banded Object
We will add a detail column to show product cost, add one more group to group the banded object by region first and then country, and add a chart in the region group. We can make use of the banded object template editor to do these things.
- Select in the banded object. Then select the Edit Template button on the visualization toolbar to access the template editor.
- Drag the detail object Cost from the Resources panel to the detail panel on the right of the Total column in the banded object.
The result is shown as follows:
- Drag Region from the Resources panel to GH in the template editor until an orange line appears above GH and then release the mouse.
The Region group will be added above the Country group:
We will insert a chart in the Region group header. The chart will inherit data from the banded object and be filtered by the region value.
- Drag the Bar Chart icon from the visualization toolbar to the GH panel of the Region group.
- In the Insert Chart dialog, add Total Sales to the Bar Length box and Category to the X-Axis box.
- Select OK to insert the chart. We will resize the chart smaller. Select in the chart to select it, then drag the bottom right corner of the chart to resize. Move the chart to the required position by dragging and dropping if required.
- Select the GH panel which contains the chart to select the panel. Drag the bottom border of the panel to be closer to the chart.
- Select the Return button on the visualization toolbar to exit the template editor. The banded object looks as follows:
- We will switch from the Region group to Sales Year to see how the chart responds to the change of the group value. right-click Asia-Pacific
and select Switch Group > Sales Year from the shortcut menu.
The banded object is now shown as follows:
Task 6: Apply a Filter
In Web Report Studio, you can apply a filter to each data component in a report individually or use the Filter panel and filter controls to filter multiple data components at a time. For the usage of filter controls, you can learn from Creating Web Reports in the Advanced Part. Here we focus on using the Filter panel to filter report data.
- Select on the title bar of the Filter panel on the left. The Select Field dialog appears.
- Check Country and Region, keep the default Apply To setting, then select OK.
A filter box which contains all values of the selected fields is added in the Filter panel, titled by the name of the first selected field in the Select Fields dialog.
- Select North America in the value list. The report comes out as follows:
At the meantime, Logi JReport processes values in the filter box to put the countries in the selected region on the top of the value list. You can select a country in the region or another other value to go on filtering the report.
- Select Mexico. The report is filtered to show the following data:
- Select the Clear button in the Filter panel to remove all filters applied to the report via the panel.
- Select on the toolbar to save the report.