Integrating JasperReports with Hibernate
Hibernate (http://www.hibernate.org) is a very popular Object-Relational Mapping tool. JasperReports (version 1.2 and newer) includes native support for Hibernate integration. This integration consists of allowing embedded report queries to be written in the Hibernate Query Language (HQL). The following JRXML template illustrates how to do this:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="HibernateQueryDemoReport"> <parameter name="countryCode" class="java.lang.String"/> <queryString language="hql"> <! [CDATA[from Aircraft aircraft where country = $P{countryCode} order by aircraft.id]] > </queryString> <field name="id" class="java.lang.String"/> <field...