This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes Jasper Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Jasper" Watch "Jasper" New topic


Richard Mart�nez

Joined: Apr 09, 2008
Posts: 2


I have a problem, when I run a JasperReport's report at the preview view and close the window, it stop the Tomcat . I am testing from Eclipse with RAD (which have the tomcat plug in), but when I close the JasperReport preview window, the tomcat automatically stop!!!.

How can I avoid that the Jasper "turn off" the Tomcat?

Thanks in advance.
Richard Mart�nez

Joined: Apr 09, 2008
Posts: 2
I found out the fix:

JasperDesign jasperDesign = JRXmlLoader.load(reportFile);
JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
Connection conn = HelperDAO.getConnectionDS();
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, conn);

Change: JasperViewer.viewReport(jasperPrint);
for: JasperViewer.viewReport(jasperPrint, false);

All fixed.
I agree. Here's the link:
subject: Jasper