I have seen a posting earlier in the site regarding Using Jasper Reports with Hibernate..and here is the wat the suggestion about how to create the reports using jasper and hibernate and convert it into pdf or any other formats.
List cats = session.find("from eg.Cat");
Map parameters = new HashMap();
parameters.put("Title", "The Cat Report");
InputStream reportStream = this.class.getResourceAsStream("/the-cat-report.xml");
JasperDesign jasperDesign = JasperManager.loadXmlDesign(reportStream);
JasperReport jasperReport = JasperManager.compileReport(jasperDesign);
JRBeanCollectionDataSource ds = new JRBeanCollectionDataSource(cats);
JasperPrint jasperPrint = JasperManager.fillReport(jasperReport, parameters, ds);
Now My doubt is HOW do i know wat kind of format is allowed in the the-cat-report.xml file mentioned in the code.
To be precise wat is the content in the xml file Is it a plain xml file or it has any mandatory tags in it.
Thanks in Advance,
Link for the above mentioned posting is given below: