Birt implementing cross-row calculations within a group

Source: Internet
Author: User

Problem Source: http://developer.actuate.com/community/forum/index.php?/topic/36160- dealing-with-previous-rows-groups-sorts-and-subtotals/

Intra-group cross-row calculations are generally implemented using SQL window functions or report scripts, but the code is complex, in which case you can use a collector to assist with reporting tools, as illustrated below.

The library table sample has three fields, where the ID is a group field. You need to design a grouping table, the ID is a group field, the Detail field is V1,V2, and the computed column crossline, Crossline's algorithm is v1+v2+ v1+ in the previous record in the group in the last record. The source data is as follows:


Data collation with the collector:


A1: Querying the database, generating more than one column of constant standby.

A2: Group by ID, and modify computed column crossline in each set of data, and finally merge. The calculation results are as follows:

A3: Returns the result of the calculation to the report tool. The collector provides the JDBC interface externally, and the report tool recognizes the collector as a normal database.


Birt implementing cross-row calculations within a group

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.