Another method to split fields into tables in Birt, birt Field
Source: http://developer.actuate.com/community/forum/index.php? /Topics/36204-split-data-row /.
Splitting a field into multiple records can be implemented using a stored procedure or report script, but the code is complicated. In this case, you can use a set calculator to assist the report tool, the following is an example.
The database table data has two fields. You need to split the ANOMOALIES field into multiple strings by space. Each string and the original ID field form a new record. The source data is as follows:
Code of the Set calculator:
A1: query the database.
A2: Split the ANOMALIES field to form a new tables. The conj function combines the computing results of each member in A1. "~" Indicates the current member in the set. The result is as follows:
A3: return the calculation result to the report tool. The assembler provides a JDBC interface. The report tool recognizes the assembler as a common database.
Here we use BIRT to design a simple list table:
Preview:
The method of the report call set calculator is the same as that of the call stored procedure. For example, if you save this script as BIRTsplitrow. dfx, you can use it in the BIRT Stored Procedure designer.CallBIRTsplitrow () to call and input parameters.
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.