...
Important: The Report Designer interface has changed. These changes are reflected in the content in this documentof current Report Designer documentation.
The latest distribution for Report Designer is available on SourceForge at http://sourceforge.net/project/showfiles.php?group_id=140317. Download the Report Designer as part of the Pentaho Open BI Suite (pentaho_demo_hsqldb-1.6.0.GA.863.zip), if you plan to publish your reports using the BI Platform provided by Pentaho. To download the Report Designer as a standalone application, go to http://sourceforge.net/project/showfiles.php?group_id=140317&package_id=192362. To follow the instructions and tutorials included in the Report Designer documentation, you must install the Hypersonic distribution of the Sample Data (pentaho_sample_data-1.6.0.GA.863.zip).
...
Follow the instructions below to configure a sample data source:. See Data Sources for additional information about the different types of data sources.
- In the Structure panel, right-click Data Source and select Add Data Source (formerly Add Pentaho Dataset). A window opens where you can configure the query used in the data source.
- Select SampleData and click the Query Designer. Make sure your Hypersonic database is running before doing so.
- Select PUBLIC from the Choose Schema list box. The SQLeonardo window is loaded. From this window, you can select the tables/views to be included in the data source.
- Select the PRODUCTS table by clicking PREVIEW. This allows you to visualize the data in the table quickly.
- Click OK to close both windows.
The data source is added to the report. The Properties tool window displays the available columns and the data type of each column. Click Configure to change the configuration of a data source. The data source is now set up and installed correctly. You must now define the look of the report.
...
If you did not change the size of the label, a warning may appear in the Messages tool window stating that the label is not big enough to display the text. Resize the label until there is enough space for the label to print the contents. Note that the warning message is immediately removed as soon as the label has a good size.
The report header band should now look roughly as shown in the screenshot like the one shown below.
Now the report definition is valid and can be previewed. Click Preview.
After you start the report engine, a preview displays that looks like final report, but is limited to a certain number of data rows you can configure in the data source. The booting process is only done once, subsequent invocations of the preview are almost instantaneous. You can go back to the design Design view by pressing the clicking Design button.
Now we are going to , add text fields that contain data from our the sample data source. Report elements that are dynamically filled with data will have the suffix field.
Drag and drop four Text Fields from the Palette to the item band as shown below:
...
The Messages tool window displays several warnings about undefined fields. Each text field should display a column from our sample data source hence we need to set each text field's "Field Name" property in the Properties tool window to match a column from the data source.
You can now preview Preview the report and customize the report definition by using different fonts, background colors, lines and additional static labels as you like.
The next section segment contains instructions for creating the total sum of all sales by introducing functions.
...
A function is a custom program that can return a value depending on other values available in the report. A function can use values available in a data source or use the value returned by another function. This can be used to calculate a total sum, average, minimum, maximum or can be used to hide a label or to hide a rectangle for in every second line. Functions can also collect values used to create charts or to format/convert a value from a data source into another data type. Functions are very flexible and make almost everything possible.
In the following section, we show you The next section demonstrates how to calculate the total sum of all sold items.
...
Functions can be added through the Structure panel by selecting the "Reporting Functions" node. All available functions are listed in the Properties tool window with a short description in a tooltiptool tip.
Since we You want to calculate the sum of all price items in the report we so select the "ItemSumFunction" and press the click Add Function to Report button.
First we have to tell the function what field should be used must be able to identify a field you specify for which to calculate the sum for and as a second property we must . You must also set the name of the function. This is very important, since because the value of the sum will be is accessible by through this name. Note that an error is displayed in the messages tool window until you set the name. It won't be possible to You cannot preview a report as long as an error is shown message displays in this tool window.
We set Set PRICE as the Field used to use to calculate the sum and we ; use PRICE_SUM as the name of the function. Don't change the values of the Dependency Level and the Group.
We now just Now you have to show this value somewhere on the report. For this purpose we will add Add a Text Field to the report footer band and set the Field Name property of the Text Field to PRICE_SUM (the functions name of the function).
You can now A preview of the report and it should look something like the screenshot shown sample below.:
The sum is printed after the last item is printed. As usual you You can adjust the report definition as you likeneeded.
Report Groups
The structure of the report definition we have so far is perfectly fineis all right, but we might you may want to merge the items for each customer and calculate the sum for each customer separately. This can by achieved by a concept called grouping. In the following section we show you is called "grouping." The next segment demonstrates how to group the data by customer.
...
Groups can be added in the Structure tool window by selecting the "Groups" node and opening the popup menu. Select "selecting Add Group" from the menu.
A group merges or groups all consecutive items with the same values in a group. Each time a new group starts, the group header band of this group is printed. Whenever a group ends, the group footer band is printed.
When you take a look at the preview of our current the sample report, we would like you want a group to start for the first item of "Erik Brown." The group should be finished complete after the last entry of "Erik Brown" and a new group should start for "Hans Meiser" and so on.
For this to happen we have to tell occur, you must force the group to apply to the fields FIRST_NAME and LAST_NAME. (FIRST_NAME only won't be sufficient because there is a "Hans Meiser" and a "Hans Müller"). Therefore; therefore, we set Group Fields of the group as shown in the next screenshotexample below:
In addition it's always a good idea to give the Always give a group a meaningful name. In this sample we will , use the name, CUSTOMER_GROUP as the name.
When you expand the group in the Structure tool window you can see that there is also a group header band and a group footer band available. These bands do not yet appear in the graphical report definition area. To make them appear just , select both bands in the Structure tool window and turn enable the Show In Layout GUI property on:
You can now see the the group header band above the item band and the group footer band below the item band. This is also the direction how in which they are printed.
To effectively make the group take effect visually effect, we move the FIRST_NAME and LAST_NAME Text Fields to the group header. To do this you can either delete the existing fields and create new ones ones in the group header or you can cut /and paste them. You can achieve this by selecting both fields, either in the graphical view or in the Structure tool window, by pressing the <CTRL button > and selecting the fields.
Now you can right-click into in the group header band and select paste:
...
The bands should look like this nowthe sample below:
Adding the total sum for each group:
...
You now have a report that sums the total sales and calculates the total sum for each customer. You can now start to visually enhance the report definition as you likeneeded.
After some minor adjustments, additional labels, and a few lines here and there there, the resulting report looks as follows: