Hello,
I'm new to using JasperReport and have been trying to display a very simple report, which has been generated and compiled in iReport. Although there are no errors reported the JRViewer is empty and displays the dialog stating that there are no pages.
Hope someone can offer some insight into what is going on. I don't know if its an issue with my java code, or the report (.jasper) file?
Cheers,
Dave.
try {
JasperReport report = (JasperReport) JRLoader.loadObject("templates\\NW-OrderAck.jasper");
HashMap <String, String> map = new HashMap<String, String> ();
map.put("name", "Mr Cake");
JasperPrint print = JRFiller.fillReport(report,map);
JRViewer viewer = new JRViewer(print);
tabs.add("Report", new JScrollPane(viewer));
} catch (JRException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}