Jump to content
JasperReports Library 7.0 is now available ×

Data Retrieval


Recommended Posts

By: Jatan Rajvanshi - jatanr

Data Retrieval

2005-08-01 15:30

Hi,

 

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

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...