• 纵向分栏


    【问题】

    Hi i have a single list of employees. Each employee will have his name and salary.

    i have given the list of employees to a table but it appears as follows

    1. Employee Name Salary
    2. harish 3000
    3. kiran 4000
    4. Emili 6000
    5. harsha 7000
    6. vardhana 8000
    7. siri         9000

    i mean each employee details appears in a single row . but i want them to appear side by side on the same page as shown below.

    1. Employee Name Salary Employee Name Salary
    2. harish            3000           harsha               7000
    3. kiran             4000           vardhana             8000
    4. Emili             6000           siri                 9000

    ----- 技术支持给的解法:代码实现

    1. on table one filtering, the following code is written
    2. pageBreakInterval=21;
    3. blockNumber=Math.floor(row.__rownum/ pageBreakInterval)+1;
    4. totalColumns=3;
    5. columnNumber=1;
    6. ((blockNumber- columnNumber)>=0)&&(((blockNumber- columnNumber)% totalColumns)==0)
    7. on table-2 filter the following code is written
    8. pageBreakInterval=21;
    9. blockNumber=Math.floor(row.__rownum/ pageBreakInterval)+1;
    10. totalColumns=3;
    11. columnNumber=2;
    12. ((blockNumber- columnNumber)>=0)&&(((blockNumber- columnNumber)% totalColumns)==0)
    13. on table-3 filter the following code is written
    14. pageBreakInterval=21;
    15. blockNumber=Math.floor(row.__rownum/ pageBreakInterval)+1;
    16. totalColumns=3;
    17. columnNumber=3;
    18. ((blockNumber- columnNumber)>=0)&&(((blockNumber- columnNumber)% totalColumns)==0)

    hi with the above code in 3 table filters i guess the first table will be filled with first 21 records and the next 21 records will be filled in the second table and the next to next 21 records will be filled in the third table. Is this right?

    【回答】

    BIRT 有分栏打印的功能,具体在 master page 标签页的 columns 属性,可以试一下。如果这种方法无效,则可以用 SPL 准备好已分栏后的数据,然后作为不分栏的表呈现即可,可以通用地解决这个问题:

    A
    1=demo.query(“select orderID,customer from orders”)
    2=create(${Col.((t=~,A1.fname().(~ +string(t)))).conj().concat@c()})
    3>Row.run(A2.record(A1.m(to(Col*( ~ -1)+1,Col*~ )).conj(~.array()))

    运行结果:

    A1:查找数据

    A2:创建表,并根据参数 Col 设置分栏数目

    A3:将源数据按参数 Row,每 Row 行分成一组,拼成 Col 列生成新数据集

    BIRT 可以通过 JDBC 连接集算器,调用脚本方法和调用存储过程一样,详情参考【BIRT 调用 SPL 脚本​】。

  • 相关阅读:
    Windchill 11文件夹选择组件使用记
    如何顺时针或者逆时针记录多边形的每个点
    第四章. Pandas进阶—数据分组统计
    HBase中的数据表是如何用CHAT进行分区的?
    RSA加密算法的数学原理
    linux,windows命令行输出控制指令,带颜色的信息,多行刷新,进度条效果,golang
    Vuex 4.x 模拟实现
    React组件设计之性能优化篇
    SpringBoot : ch06 整合 web (一)
    C++不能在子类中构造函数的初始化成员列表中直接初始化基类成员变量
  • 原文地址:https://blog.csdn.net/raqsoft/article/details/125421863