This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
It breaks because when I run the report after changing the column name, it will throw an exception that the column name not found.
What I am talking about is a data abstration layer sits between the database and your reports....even if the database structure changes then instead of being required to change what could be hundreds or even thousands of reports throughout an organization, to accomodate the change you instead make the changes in this layer and those changes are automatically passed through to all the reports.
Sorry I probably threw you a red herring with my comment. I'd go back to what Gerardo Tasistro said, you'l want to use beans or some other sort of abstraction layer (which could be hibernate or something like that). I suggest you google "Jasper Reports and data Beans" and see what you get..
Joined: Feb 08, 2005
kalyen kumar wrote:
If I use the tool independently (tool interacting directly with database and creating reports) then how can I use hibernate here...?
I am confused.........
I've used iReports with Hibernate directly and I don't recommend it. It is a nice solution, but you don't break away completely form the issues you mention. Your report tool still remains coupled to your application because any change to the application's data model. I've moved to using a pure Java Bean solution. It is the responsibility of the application to create an array of such beans and pass it to the report. That way you have:
then you have
Your application should have a way to convert a DataBean to a ReportBean in such a way to create:
Then you fill the report with reportList using JasperFillManager.fillReport(...);
Joined: Sep 18, 2008
Hi Gerardo Tasistro,
A very nice response, I am very much happy with your answer.
Thanks a lot.
Is the following same as that you are talking about......?