aspose file tools*
The moose likes Struts and the fly likes Struts and reports Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts and reports" Watch "Struts and reports" New topic
Author

Struts and reports

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi there !
I�m using Struts and need a free report generator in my project. After having searched for a good option , I�ve chosen JasperReports.
In fact I consider the report to be a view tier for me ... so I need to populate the beans and objects in general for using them in the report. I expected being able to iterate objects and print them the same way you do in a .jsp page ... or a Velocity template, but , surprisingly , it seems to be impossible for JasperReports, to get the objects and render them in the .xml ... Instead I need to define the query I have to use to get the data I need...
Is it really impossible to post the ready data to Jasper so it can use it to render the report ? I tried to do this via �parameter� tag , but it wasn�t possible ?
How do I do this ?
Has anybody used Struts together with Jasper or any other report generator ?
Thanx in advance !
F�bio
C Chavan
Greenhorn

Joined: Mar 19, 2004
Posts: 27
Apart from embedding a SQL query in report template, JasperReport also support something called DataSource. You can implement the specified interface and generate the report. Although the when implementing this interface, your data should be able to support the interface methods that are used to iterate through the data (somewhat similar to Collection).


SCJP, SCWCD, SCBCD, SCEA
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts and reports