This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

iText vs JasperReports for my reports?  RSS feed

 
Greenhorn
Posts: 20
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,


I would like to get back to a question I posted here earlier. The old thread is this http://www.coderanch.com/t/641191/open-source/Converting-dynamic-report-JasperReports. I figured I'd make a new, more brief and specific OP on the question.

So I have a reporting program and I'd like to know if you guys recommend i use iText or JasperReports for generating pdf-reports. The report has a bunch of questions under question groups which are in report parts. The database is JPA 2 (EclipseLink). The way the annotations are set up, i can fetch an entire instance of a filled out report, questions, answers, report part titles and all, in one simple query. So I'm thinking this should be just as easy when working with JasperReports? Basically, the instance of Report has ReportParts which have AnswerGroups which have Answers and Answers. Answers have a reference to the relevant question in a ReportTemplate instance so this is where i get the question for each. These would need to be looped through.

The thing is, there are a few different types of questions and answers (plain text, multiple choice, etc) and these need to be displayed accordingly. I'm not sure if this is something that can be easily done with JasperReports, for example displaying answers to multiple choice questions with checkboxes based on the selection? Can JasperReports be programmed to show data based on the subclass of my Answer class, for example MultipleChoiceAnswer? Right now this is tipping me toward iText as the layout of the report is fairly simple and I think it won't take a huge amount of coding once I get going. Also, pdf's should be enough as output and right now it doesnt seem like other formats will be needed, although I'm not 100% on that. On the other hand I guess JasperReports and iReport and the option of generating in various file formats would be handy and learning to use iReport would be good for future projects.

Thoughts? How easily could this be done with JasperReports? I'm asking so that I would hopefully start on the right path right away.
 
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Haven't used iText so I can't comment on its ease of use per se.

With Jasper Reports, the layout really is the sql. The one good thing is you can use subreports to represent each part of the layout so the query wouldn't be that complex.

From my understanding, Jasper Reports/ iReports don't have "check boxes" or "radio buttons" but I may be wrong.

At the end, it's drag and drop

Regarding format (PDF or not), the report output may differ. For example, you may want to have CSV or excel format in the future, the report layout might be different ... who knows.
 
Hey cool! They got a blimp! But I have a tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!