I am developing a standalone application using Swing and Hibernate. I need to publish reports as pdfs querying from database. I have to submit my project within 10days with pdf generating facility. I did a bit of googling and found that JasperReports is popular among Java Developers.
So, What all things (or rather technologies, like Ant, etc) i need to know before using JasperReports library?
And is there any other easy to use library for generating pdfs querying from database?
But, still i am confused, as which one will be easy to use for my requirement. (I have to submit my project within 10 Days, so will have to look to some easy to implement technology)
Joined: Mar 22, 2005
There are lots of ways to create PDFs: programmatically via iText, from XML via FOP, using JasperReports, or from CSS-styled HTML via FlyingSaucer. Which is one is easiest to get started with depends on the requirements, about which we know just about nothing, as well as your pre-existing skillset.
Joined: Jun 05, 2010
My requirement is simple pdf file, with tables having data
You can easily create JasperReports using iReport, (you can download it here). It is a simple drag and drop job, where you can easily design how and what you want to show in your reports (you also need to specify a database from where to get the data). This will generate a .jasper file, which you can use in your java code to create and read pdf files. By doing that, you will need to write only a few lines of code (you will use mainly the JasperRunManager class to write your pdf, found in net.sf.jasperreports.engine package). In the background of course it uses iText, but it takes from you all the burden of writing programmatically the design of your reports (which trust me, it can cause big headaches ).