Clear reports for rule reports without data sources and Improvements

Source: Internet
Author: User

Some reports in a report system need to display data according to certain rules, such as displaying odd day data in the query date range, it is required that the date be displayed in the database even if there is no record (the content is blank ).

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/47/88/wKiom1P8I1zxj_GCAADJWPeHKiU035.jpg "style =" float: none; "Title =" runqian_report_nodatasource_1.jpg "alt =" wkiom1p8i1zxj_gcaad#pehkiu035.jpg "/

This article focuses on the implementation of odd date sequences. The data zone is not the focus, so it is left empty.

The preceding report requirements are used as an example. Here we will take a look at the implementation process and improvement methods of the statement.

Statement implementation

The following describes how to implement a dry report. consider cross-year and cross-month situations:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/47/89/wKioL1P8JHXD6rOQAAFTM_L2R30354.jpg "style =" float: none; "Title =" runqian_report_nodatasource_2.jpg "alt =" wkiol1p8jhxd6roqaaftm_l2r30354.jpg "/>

When using this function, you must hide column A of the secondary column and filter row 2nd. Even dates are not displayed. Therefore, report tools rely on a large number of hidden columns.

The implementation of the report tool requires the use of hidden rows. The main reason is that data computing and report presentation are mixed together. Both report Presentation and data computing are required, which often leads to insufficient report computing capabilities. If you can split data computing and report presentation, report development will be faster.

Rundry report 5.0 is a powerful computing report tool launched when the core functions of the original rundry report are retained. Its built-in set calculator is very suitable for data computing, this separates report data preparation and presentation. In this example, it is much easier to use a set computing report. The method is as follows:

Set Computing report implementation

Compile the computing script

First, write the computing logic using the set calculator to output an odd day between two dates for the report.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/47/88/wKiom1P8I17xcuv_AADGsp2v3ns365.jpg "style =" float: none; "Title =" runqian_report_nodatasource_3.jpg "alt =" wkiom1p8i17xcuv_aadgsp2v3ns365.jpg "/>

A1: Lists All dates in this date segment based on the start and end date parameters.

A2: select an odd day

A3: return result set of the report.

Report call

Use the report designer to create a report, use the dataset type of the Set calculator, and select the Set Computing script (time. DFX) Edited above)

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/47/88/wKiom1P8I1-z8BatAAEDSi19r9Y547.jpg "style =" float: none; "Title =" runqian_report_nodatasource_4.jpg "alt =" wKiom1P8I1-z8BatAAEDSi19r9Y547.jpg "/>

Set a report template and Expression

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/47/89/wKioL1P8JHbB0AkhAAArTY_pzJU491.jpg "style =" float: none; "Title =" runqian_report_nodatasource_5.jpg "alt =" wkiol1p8jhbb0akha1_ty_pzju491.jpg "/>

In a report, you only need to set simple list values without complex computing.

Because of its effective support for set operations, it is very easy to select part of the data (odd day) from a set (ALL dates. Unlike computing in a general report tool, the set compute does not have any display attribute during data computing, so it is more efficient. At the same time, because the report end no longer contains a large number of hidden cells, the report efficiency is further improved.

In addition, for scripts with simple code, you do not have to edit the script file independently. Instead, you can directly embed the script into the Report Template Using the script dataset built in the computing report. The method is as follows:

1. Click "add" in the dataset settings window. The dataset Type dialog box is displayed. Select "script dataset"

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/47/89/wKioL1P8JHfAVp-YAACBO0RLf9c855.jpg "style =" float: none; "Title =" runqian_report_nodatasource_6.jpg "alt =" wKioL1P8JHfAVp-YAACBO0RLf9c855.jpg "/>

2. Compile the computing script in the pop-up script dataset editing window:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/47/88/wKiom1P8I2Dg4oCEAADvraum9YA666.jpg "style =" float: none; "Title =" runqian_report_nodatasource_7.jpg "alt =" wkiom1p8i2dg4oceaadvraum9ya666.jpg "/>

In the script dataset, you can directly use the parameters defined in the report. For example, begin and end in the preceding script are report parameters.

3. Report calls, which are used in the same way as other datasets.




Clear reports for rule reports without data sources and Improvements

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.