Getting started with Report Designer
Use this topic to create and refine a sample report in Report Designer.
You use Pentaho’s sample database in these steps. Sample data is installed by default with Report Designer.
In this topic
About Pentaho Report Designer
Pentaho Report Designer is a report creation tool. You can use it standalone or as part of the Pentaho Business Analytics suite.
It helps you build detailed reports from prepared data. You can connect to most data sources.
Create a report with Report Designer
Perform the steps below to create a report using Report Designer.
Start Report Designer. Go to Start > Programs > Pentaho Enterprise Edition > Design Tools > Report Designer.
The Report Designer home page appears.
To change the zoom level, drag the percentage in the upper-left corner. Double-click it to reset to 100%.
Click New Report in the Welcome dialog box.
The design workspace appears.
In the right pane, click the Data tab.
Right-click Data Sets and select JDBC.
You can also click the yellow database icon.
Under Connections, select SampleData (Hypersonic).
Next to Available Queries, click the plus sign to add queries.

JDBC Data Source dialog box Query 1 appears under Available Queries.
Click the edit icon (
).The SQL Query Designer window opens.
Select PUBLIC in the schema filter menu. Double-click ORDERFACT so the table appears in the workspace.

SQL Query Designer In the SQL Query Designer workspace, right-click ORDERFACT and select deselect all.

Clear all, SQL Query Designer Select the ORDERNUMBER, QUANTITYORDERED, PRICEEACH, and ORDERDATE fields.

Orderfact fields Double-click PRODUCTS so the table also appears in the workspace.
Notice the line joining the ORDERFACT and PRODUCTS tables.
Clear all PRODUCTS fields. Then select PRODUCTNAME and PRODUCTLINE.

Products table Click the Syntax tab to view the SQL statement.
Notice that PRODUCTCODE joins the tables.

Syntax tab Click OK to return to the JDBC Data Source dialog box.
The SQL statement appears under Query.
Click OK in the JDBC Data Source dialog box.

Query 1 fields The fields now appear under Query 1.
Next: Design your report.
Design your report
This exercise walks you through designing your report layout.
Under View, select Element Alignment Hints and Snap to Elements.
These options help align elements.
Under Query 1, drag ORDERNUMBER into the Details band.
Add ORDERDATE, PRODUCTNAME, QUANTITYORDERED, and PRICEEACH to the Details band.
Do not overlap fields.
Resize PRODUCTNAME larger. Resize QUANTITYORDERED smaller.

Resizing Click Preview (
).
Report preview Click Edit (
) to return to the workspace.
Next: Refine your report.
Refine your report
You created a report in the previous exercise. Now add labels, headers, and row banding.
Drag a label (
) to the Page Header band.The Structure tab updates.

Structure tab Click inside the label and type
Order Report.Select the label text. Set the font size to 18. Apply bold.

Font resizing With the label selected, set a font color.
The page header appears on every page.
Create column headers. Click Details Header under the Structure tab.
The Style and Attributes tabs appear.
Under common in Attributes, set hide-on-canvas to False.
The Details Header band appears.
Click the Select Objects icon (
).Select all column objects in the Details pane.

Selected objects Press Ctrl+C to copy. Press Ctrl+V to paste into the Details Header pane.
Select Format > Morph > label.
The objects change to labels.
Type the header labels:
Order No.,Order Date,Product Name,Quan., andPrice Each.Click Preview (
).
Report example Select Format > Row Banding.
In the Row Banding dialog box, select Yellow for Visible Color. Click OK.
Click Preview.

Report with row banding Select File > Save. Save to
.../report-designer/samples. UseOrdersas the file name.
Next: Row banding, data formatting, and alignment.
Row banding, data formatting, and alignment
Row banding
Create a row band element to control which fields show banding. You can name the row band element anything.
In this example, the row band element is named row-band-element.

After you create the element, select the fields to band. In Attributes, type row-band-element in the name field.

Data formatting
Report Designer uses default formats for dates and numbers. You can change formats under Attributes.
Select a field. Then select a value for format.
In this example, Order Date uses MM-dd-yy.

Preview the report to confirm the results.

You can also type a custom format string. Use the JavaScript date and number format syntax.
Alignment
To align multiple objects, select them first. Then choose an alignment option under Format.
To multi-select, press Shift and click each object. You can also use Select Objects (
) and drag to select.

Next: Add a chart to your report.
Add a chart to your report
In this exercise, you add a chart to your report.
Select File > Open. Open the report you saved earlier.
In the Palette, drag a Chart icon (
) into the Report Footer band.Resize and center the chart.

Chart resizing handles Double-click the sample chart.
Select the pie chart icon.
Chart properties are listed on the left. Data properties are listed on the right.
Under Title, set chart-title to
Product Pie Chart.Under Common in Primary DataSource, set value-column. Click the ellipsis to open the Select Field dialog box.
Select QUANTITYORDERED and click OK.
Under Series, click the ellipsis next to series-by-field.
The Edit Array dialog box opens.
Click the Add icon (
).Select PRODUCTLINE and click OK.
Click OK to close the Edit Chart dialog box.
Click Preview (
).Scroll to the last page.

Displayed report Save your report.
To use a bar or line chart, change the chart type. Add series-by-value entries for SALES and COST.
Next: Add parameters to your report.
Add parameters to your report
Now make your report interactive by setting parameters. Users get prompted for values when they run the report.
In Report Designer, open your Orders report.
Select Data > Add Parameter.
You can also select Master Report Parameter (
) under the Data tab.The Add Parameter dialog box appears.
In Name, enter
enter_prodline.In Label, enter
Select Line.For Display Type, select Drop Down.
Under DataSources, select JDBC (SampleData (Hypersonic). Click the Edit icon (
).The JDBC Data Source dialog box appears.
Under Connections, select SampleData (Memory).
Next to Available Queries, click Add (
).Query 2 is added.
In Query Name, enter
prodlineList.In Query, enter the following SQL:
You can also build the query in SQL Query Designer.
Click OK to close the Data Source dialog box.
In the Add Parameter dialog box, under DataSources, select prodlineList.
For Value Type, select String.
Optional: Set a default value, such as
Motorcycles.
Add Parameter dialog box Click OK to close the Add Parameter dialog box.
Map the parameter back to Query 1. Under Data, double-click Query 1.
Click the Edit icon (
) to open SQL Query Designer. Right-click PRODUCTLINE and select add where condition.In the condition editor, enter
${enter_prodline}. Click OK.
Condition.edit dialog box Click OK to close SQL Query Designer.
Click OK to close the Data Source dialog box.
Click Preview.

Product line menu Save and close the report.
Next: Publish your report.
Publish your report
Now publish the report to a Pentaho server.
In Report Designer, open the report you created.
Select File > Publish.
You can also select Publishes the report on a Pentaho server (
).In the Login dialog box, confirm the server URL is
http://localhost:8080/pentaho/.
Login dialog box Click OK.
The Publish to Server dialog box appears.
Enter a report title and description.
Under Location, save to
...public/Steel Wheels.Set Output Type to html and click OK.
A success message appears.
Click Yes to open the User Console and view the report.
To view it later, go to
http://localhost:8080/pentaho/. Then browse to theReporting Examplesdirectory.Log in as
Admin.The default password is
password.Select a product line parameter value. Keep the default Output Type.
Your report is now available to users.
Last updated
Was this helpful?

