Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

"The document has no pages" message in JasperReport

807603Feb 14 2008 — edited Feb 14 2008
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();
				}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 13 2008
Added on Feb 14 2008
1 comment
905 views