I just started working with iReport and got the task to make some changes to existing reports.
Currently, there is a main report with sections A and B (contact details and other information). There is a sub-report C, and then a sub-registry D. My task is to replicate A and B for each item in D. If the report has many sections D, I want to have A and B for each.
All data is in one XML document and to get data for sections A and B I just
((net.sf.jasperreports.engine.data.JRXmlDataSource)$F{REPORT_DATA_SOURCE}).dataSource("/Header/")
and for an additional report with section D
((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("/Header/ProductHeader/Member")
if I drag a field from the document structure that displays the data in section A to section D and validates the expression that it says $ F {ContactNumber} but displays Null in D, even if it displays the value in section A
How do I change my data sources to display the contents of A and B in D?
Thanks in advance
source
share