views:

117

answers:

5

hi there,

here we are talking about three main products: JasperReports: which is just a library to generate reports and fill it iReport: which is GUI tool to develop templates used by the above library JasperServer: which is full application with web interface for managing reports with users permissions and other features,

documentation is really not that good, i want to use the best of the above products to integrate jasperReports with my application (Spring/Hibernate), so please advice what is tyhe best approach to do this,

1- design reports using ireport using embedded sql generation,and make it as a separate project from mine, i tried to use hibernate or spring within ireport but also i faced a lot of problems and no clear documentation for this part

2- attach it with my project, to use same hibernate configuration, already created entities

3- try to use jasperServer which seems to be complicated, and then expose reports as webservices

or any other better, guaranteed approach, i know it's dependant on the way my project is dealing, but i've shortage in time, so it depends on the approach having better documentations or tutorials,

Regards,

+1  A: 

See http://en.wikipedia.org/wiki/JasperReports for the "What is" part of your question.

I faced the same problems when considering to use Jasper-reports in my application, I ended up given it up completely.

Anyway, take a look at this post for more information about different report frameworks for Java. http://stackoverflow.com/questions/3243326/generating-reports-what-works-for-you

I wholeheartedly recommend that you take a look at BIRT http://www.eclipse.org/birt/phoenix/

I've used it with both Spring and Hibernate, and have no complain so far.

StudiousJoseph
so it's really that jasperReports is so complicated product or what, i think it's ranking at the top of other reporting tools, i'll check Birt, thanks for your reply
Amr Faisal
A: 

You can write your own Jasper framework in a module or subproject. You can maintain report definitions separately from queries and feed them with data produced by your code.

This way all data and handling stays in your project where it's easier to track or edit (e.g. when you only need to change an aspect of the query, add a filter or rewrite it for better performance). Also, this way you can use report data for something else (e.g. add CSV or XML output).

Konrad Garus
your approach seems better, but could you please calrify 'You can maintain report definitions separately from queries and feed them with data produced by your code' more
Amr Faisal
Create and maintain jrxmls with iReport. In your code, load data however you need (SQL/Hibernate/_anything_) and call `JasperFillManager.fillReport()`
Konrad Garus
Ok that what i realized from first answer, but you make it clearer, i think it's the best approach till now, regards,
Amr Faisal
A: 

For JasperReports can you buy documentation. You'll get a book and sample code that can help a lot. I just looked at the website (it's been some time ago I worked with JasperRepors, currently no reporting to do), they have a professional design application as well now: http://www.jaspersoft.com/jasperreports-professional.

Gerbrand
ok the idea of buying books is acceptable, but buying commercial products isn't, cause our choice for jasperReports was because it's free open source product, thanks for help
Amr Faisal
I must add: an open source product *can* still be commercial. That is there created or maintained to earn money. Like JBoss, Spring, Apache and many others.I hope you don't have th 'no commercial' policy just because open source is supposed to be free as in beer.
Gerbrand
A: 

I can't comment on the other two approaches, but we are using Jasperserver and that seems to be more appropriate if you want to actually use a portal with which people will access their reports. With this, you create reports in ireport and publish them to the portal. People log in to the portal to access their reports. I don't think you'd use Jasperserver if you were simply embedding it in your application.

Rich
A: 

I've started using JasperServer-pro recently and tbh I quite like it. As far as I know there seem to be plenty of options in the way of integrating it with existing apps :-

1 -Deploy as standalone server, and use the WebService API to call into to generate and return your reports (these have to be predefined, either through iReport or JasperServer's own AdHoc Report Editor.

2- Deploy as standalone server, and do URL calls through a kicked-off browser to pull up reports (again predefined)

3 - (Pro-only) - Download the WAR BIN installer and rebrand it.

4 - Download the source code for JasperServer and build it from ground up

5 - Download the source code / JasperReports jars and borrow the parts you want to use in your source code.

Neil