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