• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts and reports

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).
 
reply
    Bookmark Topic Watch Topic
  • New Topic