-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I'm a newbie with zk, java, jasper, html, xml....
I did a pdf report with jasper and zk and works fine, with datasource.
Is possible to use zk and jasperreport with JPA?
I try this but don't work: (zero records printed)
<?page title="Report jpa DataFast" contentType="text/html;charset=UTF-8"?>
<zk>
<style src="test.css"></style>
<include src="/menu.zul" height="25px" />
<window title="Stampa Movimenti prova jpa" border="normal"
width="100%" height="95%">
<zscript>
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
public EntityManagerFactory emf;
emf = Persistence.createEntityManagerFactory("MiUnidadPersistente");
EntityManager em = emf.createEntityManager();
Map parameters = new HashMap();
parameters.put("JPA_ENTITY_MANAGER", em);
//zk.demo.categ.CategDS ds = new zk.demo.categ.CategDS();
</zscript>
<jasperreport id="report" src="reports/report1_jpa.jasper"
parameters="${parameters}" type="html" >
<attribute name="onCreate">
Clients.showBusy("Attendere mentre si genera il report...", true);
Events.echoEvent("onLater", self, null);
</attribute>
<attribute name="onLater">
Clients.showBusy(null, false);
</attribute>
</jasperreport>
</window>
</zk>
with iReport 3.0.0 works ok.
Thank you
Pedro Gonzalez
Asked: 2009-09-10 20:13:54 +0800
Seen: 1,274 times
Last updated: Sep 10 '09