youseries / ureport

UReport2 is a high-performance pure Java report engine based on Spring architecture, where complex Chinese-style statements and reports can be prepared by iterating over cells.
Apache License 2.0
2.02k stars 834 forks source link

如何实现动态列 #589

Open newShiJ opened 1 year ago

newShiJ commented 1 year ago

现在有一个需求 希望做一个动态报表 在报表中有几个列 的名称和数量是希望动态生成的 不知道需要怎么操作才能实现

okokokog commented 9 months ago

可以看下iTextPdf的监听器。com.itextpdf.text.pdf.PdfPageEventHelper类提供了事件监听,可以在这里面对Document对象进行自定义操作