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
posted 11 years ago
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).