单字段纵向分栏

【问题】

Hi,

I’m trying to display BIRT report Data (only one field) first vertically till the page ends and then it should continue in the next column of the same page. For example as

A E I
B F J
C G
D H

By using list element I’m able to get the data in horizontal first and then vertically like…

A B C D
E F G H
I J

But I need the data to be displayed in the report as first example. Can this be done using List element? Please let me know how to do this. Appreciate your help.

【回答】
上述这种对单字段分栏的报表用集算器准备数据源会好实现得多,代码很简单:

A
1=myDB1.query("select orderID from sorder").(orderID)
2=A1.(~.string().split())
3=to(A2.max(~.len()))
4=create(${A1.len().((t=~,A1.fname().(~+string(t)))).conj().concat@c()})
5=A4.record(A3.conj(A2.(~.m(A3.~))))
6return A5

A1:查询表数据

A2:对 A1 的字段值做拆分

A4:创建分栏后的表结构

A5:将 A2 记录填入分栏后的表

报表工具中可通过 JDBC 访问集算器脚本,像数据库一样使用,参考Java 如何调用 SPL 脚本

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值