File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

configuring jasper reports with struts

 
Jim Colwood
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am trying to add a reporting module in my existing web app. I am using Struts & IBatis frameworks in my app.

This is waht I have so far...
In my Actin class...
1. I compile .jrxml & get jasperReport object.
2. create dataSource object by passing a List in JRBeanCollectionDataSource() constructor.
3. get JasperPrint object by calling JasperFillManager.fillReport(jasperReport, parameters, dataSource)
4. create exporter object from JRHtmlExporter class & call exporter.exportReport().
5. forawrd control to the display jsp to display the report.

The problem is...
It doesn't forward to the JSP I specified in struts-config.xml. I think exportReport() method take control & process the request w/o giving control back to struts. I also tried doing all of the above on my display JSP & just forwarding request to this JSP from my action class, but of no use.

Is there an easier way of configuring Jasper Reports with struts? I would appreciate any help.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic