2001 JI Open Discussion Posted August 21, 2006 Share Posted August 21, 2006 By: Jatan Rajvanshi - jatanr Data Retrieval 2005-08-01 15:30Hi, I need a little more understanding on the way data is retrieved from the database when a report is run. Suppose we have a query in the report design xml. In such a case, while calling the JasperFillManager.fillReport() method, we will pass the Connection object directly to it. Internally, as I understand, the query will be run and the data returned will be filled in the JasperPrint object. Suppose, now we have our own implementation of the JRDataSource. In this case, we will need to somehow get an instance of the custom JRDataResource before it can be passed to the JasperFillManager.fillReport() method. So I am assuming that there will need to be some way of creating that custom JRDataSource object. What are the different ways of populating that custom data resource object? One way of doing it is to get the data in the constructor of the data source object when it is instantiated. Any ideas on some other ways to do it? Is my understanding correct in this regard? Thanks a lot for ur help! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now