Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Jasper and Struts

Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • 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 !
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Instead of defining a query directly in the report template, it is also possible to use a instance of JRDataSource. JasperReport provides default implementation supporting ResultSet and Collection.
Yeast devil! Back to the oven that baked you! And take this tiny ad too:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!