Report design skills-cross Report Template

Source: Internet
Author: User

The core of traditional report development articles is about how to set report formats, titles, fields, and how to obtain data. This is just an introduction to report design. This article does not discuss it here. This article only describes how to design reports in batches-Cross report templates.
Traditionally, it seems reasonable to design a report file when developing each report. However, in actual development, this approach is extremely laborious (500 words are omitted later), and I do not want to do this anyway.
This method is also taught by my colleagues. You can use cross-Report to simplify the report design steps:

Take crystal report as an example (Jasper for Java)
(1) pre-defined cross-Report Templates for Crystal Reports. For example:
Cross_1x1.rpt
Cross_2x1.rpt
Cross_3x1.rpt
Cross_2x2.rpt
....
(2) The Field names of these report templates are written to death, for example:
Column1
Column2
Column3
Column4
Column5
...
Value
(3) Use the push mode to provide data for reports
Use code to obtain data (note that the fields in the report template are the same), and then push the data to the Crystal Report for display.
(I personally think that the PULL mode is quite messy. This method writes the data acquisition steps into the report file, which is quite inflexible in practical applications)

Effect:
(1) data as follows:
Column1 column2 Value
Ryan phone 1000
Ryan broadband 2000
Wenzhou phone 3000
Wenzhou broadband 4000
...
(2) Use the cross Report Template cross_1x1.rpt to display the following results:
Total telephone bandwidth
Ryan 1000 2000 3000
Wenzhou 3000 4000 7000
Total 4000 6000 10000

Therefore, the work of report developers can be simplified:
(1) Set Report conditions: This step can also be automatically generated using the configuration file.
(2) Obtain report data: obtain data based on the conditions set by the passing user
(3) specify a Report Template
In this way, developers can focus on getting data without dealing with the UI, which greatly improves the efficiency of report design, which is quite convenient in actual work.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.