Another way to implement a field split into a table in Birt

Source: Internet
Author: User

Source: http://developer.actuate.com/community/forum/index.php?/topic/36204-split-data-row/.

Splitting a field into multiple records can be accomplished with a stored procedure or report script, but the code is more complex, in which case you can use the collector to aid the reporting tool, as illustrated below.

Library table data has two fields, and you need to split the Anomoalies field into multiple strings by space, each string and the original ID field to form a new record. The source data is as follows:


The Collector code:


A1: Querying the database.

A2: Splits the anomalies field to form a new two-dimensional table. The function Conj can merge the results of each member in the A1. "~" represents the current member in the collection. The 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.

The following is a simple list table designed with Birt:


preview:


The report calls the collector the same way you call a stored procedure, such as saving this script as BIRTSPLITROW.DFX, and you can invoke and enter parameters with call Birtsplitrow () in the Birt stored procedure designer.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Another way to implement a field split into a table in Birt

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.