16
How to Design a Report? Effect Display It is a typical cross template, consisting of slash cell, aggregation cell, formula cell and chart cell. It supports grouping horizontally and vertically and parameter query. The following section will introduce the whole process of how this template is made, deployed and displayed, leading you to a new application system developing journey started by FineReport Reporting Tool.

How to design a report with fine report reporting tool

Embed Size (px)

Citation preview

Page 1: How to design a report with  fine report reporting tool

How to Design a Report?Effect Display

It is a typical cross template, consisting of slash cell, aggregation cell, formula cell and chart cell. It supports grouping horizontally and vertically and parameter query. The following section will introduce the whole process of how this template is made, deployed and displayed, leading you to a new application system developing journey started by FineReport Reporting Tool.

Start Report Designer1. Start DesignerAfter downloading the installation file from FineReport official website,

please follow the guide to install FineReport on your computer. You can also refer to Installing FineReport to finish the installation. Then you can can click Start>FineReport_8.0>Designer to start designer.

Page 2: How to design a report with  fine report reporting tool

2. Activate Report DesignerIt is required to input user information to activate the designer at the first time as shown below.

Click the ‘Click to get activation code‘ button, the dialog box will link to our official webpage. Please leave your e-mail address and the activation code will be automatically sent to your e-mail box within a few minutes. Come back to fill the blank with the code, click Use Designerbutton, and then the designer will be activated successfully.

3. Connect to DatabaseAfter starting designer, click menu Server(s)>Define Data Connection,

then a dialog box will pop up as shown below.

Page 3: How to design a report with  fine report reporting tool

The designer has connected to a database named FRDemo by defaul, click Test Connection and the pop-up dialog box will inform users of the results. There are other connection methods, such as JDBC, for which users can refer to JDBC Connect to Database.

Now we can use data in database to design template since FineReport designer has connected to database.

New Workbook and Dataset

Click from the Quick Toolbar to create a new workbook.

Page 4: How to design a report with  fine report reporting tool

In the lower-left corner,there is a Template Dataset window listing all the available datasets. Click button to add a dataset.

Create a new dataset ds1 and define the SQL statement as SELECT * FROM sales where region =’${region}’. This is an SQL statement with parameter whose name is “region”.

Click Refresh button in the parameter panel below and users can obtain the parameters of the dataset. Set the default value as “East”, clickPreview and the effect is as shown below.

Create dataset ds2 in the same way and define the the SQL statement as

Page 5: How to design a report with  fine report reporting tool

SELECT * FROM salesvalue.

Design StyleThe effect is as shown below:

Title: Merge cells A1 to D2 and input Region Sales Situation.

Border: Select area from A3 to D5 and click in the toolbar; open the

drop-down menu and select to add frames both inside and outside.

Slope lines: Merge cells A3 to B3, right click the cell and select Cell Element. In the drop-down menu, click Insert Slope Lines. The system will pop up a dialog box to edit the slope line, input information we’d like to add: product |sales| region. Users can also adjust the words through adding spaces. Effect is as shown below.

Bind Data ColumnThe final effect is as shown below.

1. Bind Data ColumnDrag the data column to the cell and set properties. The setting position

Page 6: How to design a report with  fine report reporting tool

and method is as shown below.

Following the method below and drag other data columns to the corresponding cells and set properties as shown below.

2. Multi-dataset LinkageBecause the data comes from two different datasets, it is required to use

data filter to build connections between them. Select cell D4 and click the Filter button in the upper right corner of the property panel as shown below.

Page 7: How to design a report with  fine report reporting tool

Open Filter setting panel and add conditions as shown below, make sales of ds2 equal sales of ds1.

Parameter PanelIn most cases, users need to use parameters to display part of the data

that meets certain requirements. Here, parameter design is actually a dynamic process of filtering data, helping the user to realize real-time interaction with data. FineReport reporting software has an embedded parameter panel to allow users to adjust the positions of parameters;

Page 8: How to design a report with  fine report reporting tool

moreover, users can get different data selection style through widget setting. We will introduce the design process of parameter query on the basis of previous report.

1. Layout of Parameter PanelClick Parameter Panel and you will enter the editing interface. In New

Workbook and Datasetsection, we defined parameter region in dataset ds1. The defined parameters will display in the lower-right corner; click Add All, FineReport will use default layout to generate parameter interface, where users can adjust the panel as they wish.

2. Style of Parameter ControlSelect ComboBox as the control’s type as shown below.

Select ComBox control and set its dictionary in the upper-right corner. Select Database Form> FRDemo>sales and define Actual Value and Display Value as Region.

Page 9: How to design a report with  fine report reporting tool

Define ChartsApart from table, FineReport can also use chart to visually display data.

We will add chart display on the basis of the previous template to show every product’s sales conditions. We will select the cell data source, which means the data come form cells.

1. Insert ChartMerge cells from A7 to D18 and click Insert>Cell Element>Insert Chart

on menu. The dialog box will pop up as shown below. Here we choose Column Chart and click OK.

Page 10: How to design a report with  fine report reporting tool

Then select Chart Properties-Data in the upper-right corner. Set Datasource by default.

Input formula: Category=B4Set Series Name and Series Value separately=C3 and =C4.The effect is as shown below.

Page 11: How to design a report with  fine report reporting tool

2. Set Expansion PropertiesWe only want the chart here to reflect the whole conditions, so the Left

and Upper Parent should be set None. Select the chart and Cell Properties-Expansion setting panel is in the lower-right corner as below.

Page 12: How to design a report with  fine report reporting tool

PreviewInputhttp://localhost:8075/WebReport/ReportServer?

reportlet=GettingStarted.cptin browser to view the chart.

According to the process of creating the frist report, we can summarize

Page 13: How to design a report with  fine report reporting tool

the procedure of template making as shown below: