Hello! I need to create a Report compsed by 2 files x.jrxml. One file is a table populated by java and the other file is "the table of content" which refers to a field in the previous table. I have called my parameter in Jasper Report in this way $P{tabDerrate} and I have assigned it to my table. I have assigned one field of my table with hyperlink to the "the table of content". This a part of my code in java:
String filePath = "C:\\Users\\........"; List<Derrata> derrateList = new ArrayList<>(); I'll populate my table with some values JRBeanCollectionDataSource JRBDerrate = new JRBeanCollectionDataSource(derrateList); Map<String, Object> parameters = new HashMap<>(); parameters.put("tabDerrate", derrateList); JasperReport report = JasperCompileManager.compileReport(filePath); JasperPrint print = JasperFillManager.fillReport(report, parameters, new JREmptyDataSource()); JasperExportManager.exportReportToPdfFile(print, exportPath);
and when I lunch i have this error
Exc net.sf.jasperreports.engine.design.JRValidationException: Report design not valid : 1. Parameter not found : tabDerrate
What am I doing wrong? Am I using the wrong object? Thank you for the help.
0 Answers:
No answers yet