I. Overview
1. Version
Report server version |
---|
10.0 |
2. Expected effect
Multi source: the data source of a report comes from multiple data tables or even multiple physical databases. Many of them are not two or three, but seven or eight or even more than a dozen, which cannot be converted into a single source.
Slicing: a report is divided into multiple regions vertically or horizontally or bi-directionally, and each region is often from different data sources.
As shown in the figure below, such a report is a multi-source split report
3. Implementation ideas
Multi source sliced report usually has complicated horizontal header and vertical header. When designing multi-source sliced report, the header can be designed first, and then the data in the middle part can be designed finally. At this time, you only need to set the corresponding filter, and finally set the template data dictionary and other display settings.
Another way to quickly make multi-source slice report is to design each slice separately, as shown in the report in the figure above. You can design slice 1 first, and then design slice 2 after confirmation, and so on. Finally, you can set the template data dictionary and other display settings.
II. Examples
1. Report making
1) Data preparation
Connect to the database FRdemo, and create four new datasets named employee, product, orderdetail and order. The corresponding SQL statement is as follows:
Employee: SELECT EMPID,title,EMPname FROM EMPLOYEE_copy
Product: SELECT * FROM Products
Orderdetail: SELECT orders.orderID,orders.empID,productID,quantity,(quantity*price) AS total FROM orders,ordersdetail WHERE orders.orderID=ordersdetail.orderID
Order: select * from orders where shipmethod = 'UPS'
2) report style
The report style is as follows:
Merge cells A1~C2, insert a slash, and the content is:Product|Quantity|Other, selectDiffuse from top left to bottom right, as shown in the following figure:
Slice 1 production
Slice 1 is grouped by shipmethod and employee, as shown in the following table. For here, we just use one shipmethod as an exmaple.
Cell | dataset | data column | properties |
---|---|---|---|
A3 | Order | Ship method | default |
B3 | Employee | EmpID | default |
D1 | Product | ProductType | expanded from left to right, and the rest is the default |
D2 | Product | ProductID | expanded from left to right, and the rest is the default |
D3 | Orderdetail | total | summary, add filter, empID equals to 'B3 'and productID equals to 'D2' |
D4 | Orderdetail | quantity | summary,add filter, empID equals to 'B3 'and productID equals to 'D2' |
Example: The settings of cell D3, as shown in the following figure:
Slice 2 production
Slice 2 directly counts the total amount and quantity, as shown in the following table:
Cell | dataset | data column | properties |
---|---|---|---|
D5 | Orderdetail | Total | summary, add filter, productID equals to 'D2' |
D6 | Orderdetail | Quantity | summary, add filter, productID equals to 'D2' |
Slice 3 production
Slice 3 is divided into groups according to the employee's position and employee, as shown in the following table:
Cell | dataset | data column | properties |
---|---|---|---|
A7 | Employee | Title | default |
B7 | Employee | EmpID | default |
D7 | Orderdetail | Total | summary,add filter, empID equals to 'B7 'and productID equals to 'D2' |
D8 | Orderdetail | Quantity | summary,add filter, empID equals to 'B7 'and productID equals to 'D2' |
2. Morphology settings
According to the needs, set the data display style, shape, color, etc.
For C4, C8, E2 and E3 cells, the configuration data dictionary is set in the form of database table. The specific settings are as follows:
Cell | Dataset | datatable | Actual Value | Display Value |
---|---|---|---|---|
B3 | FEDemo | Employee | EmpID | EmpName |
B7 | FRDemo | Employee | EmpID | EmpName |
D2 | FRDemo | product | ProductID | ProductName |
Example: B3 cell display setting is shown in the following figure:
Other cells are similar and will not be explained.
3. Effect preview
1) PC sideSave the template and select Pagination Preview to achieve the effect as shown in Section I.2.
Note: If you don't want the data to be displayed in pagination, you can select "Data Analysis"
2) Mobile terminalApp
HTML5
III. Template download
For completed templates, please refer to: %fr_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\ReportApplication\BasicApplication\SlicedMulti.cpt
Click to download the template: