Another method to split fields into tables in Birt, birt Field

Source: Internet
Author: User

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.

Related Article

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.