Jasperreports - how to get JSON to populate a subreport

前端 未结 3 1902
迷失自我
迷失自我 2021-01-13 07:05

I am trying to get a table to populate with the same data in my main report using Jasper/iReport. How can I get the Json to carry over?

In Edit table datasource I\

3条回答
  •  醉酒成梦
    2021-01-13 07:32

    I was struggling with a similar problem when using sub reports. It seems that the JSON datasource gets consumed by the main report so you need to invoke subDataSource() to get a fresh datasource for your sub reports and maybe for tables, too - haven't tested that yet though...

    Data Source Expression: ((net.sf.jasperreports.engine.data.JsonDataSource)$P{REPORT_DATA_SOURCE}).subDataSource()

提交回复
热议问题