* How to divide data into horizontal columns in BIRT
Key words:divide data into horizontal columns display from left to right in BIRT
For example, you need to deal with a scenario where data records are arranged horizontally into three columns. The effect is as follows:
BIRT can divide data into columns vertically, but it is difficult to realize the layout of records placed horizontally and column by column. Some netizens proposed that: bind dataset to list element, arrange one or more data fields in grid, and embed sub grid to realize the goal. But all this idea belongs to theoretical stage, and does not give complete examples. It can be imagined that even if it can be realized, it is also necessary to write complex script and messy grid splicing. The workload is huge. The source data format is as follows:
Some special layout is difficult to be directly realized through the functions provided by the reporting tool itself, but if a suitable data source is prepared, the difficulty of report design can be greatly reduced. esProc SPL can assist BIRT to prepare the data that has been divided into columns, and BIRT only needs to receive the processed data and present it. The code is as follows:
A |
B |
C |
|
1 |
=myDB.query("select EId,Name,Dept from emp where EId>=? and EId<=? order by EId ",begin,end) |
||
2 |
=A1.step(3,1) |
=A1.step(3,2)|[null] |
=A1.step(3,3)|[null] |
3 |
=A2.derive(B2(#).EID:EID2,B2(#).NAME:NAME2,B2(#).DEPT:DEPT2,C2(#).EID:EID3,C2(#).NAME:NAME3,C2(#).DEPT:DEPT3) |
||
4 |
return A3 |
In fact, there are many similar format layout problems that are not easy to deal with in BIRT, but it is very simple with the help of esProc SPL. You can refer to: Some examples of solving BIRT special layout
esProc provides JDBC driver, and can be easily integrated with BIRT and other reporting tools. Please refer to How to Call an SPL Script in BIRT
Read Getting Started with esProc to download and install esProc, get a license for free and find related documentation.
SPL Official Website 👉 https://www.scudata.com
SPL Feedback and Help 👉 https://www.reddit.com/r/esProcSPL
SPL Learning Material 👉 https://c.scudata.com
SPL Source Code and Package 👉 https://github.com/SPLWare/esProc
Discord 👉 https://discord.gg/cFTcUNs7
Youtube 👉 https://www.youtube.com/@esProc_SPL