Jump to content
Changes to the Jaspersoft community edition download ×

Custom Data Adapter


sbyrne

Recommended Posts

I have a web service that I want to get data from and put it into a Jasper report, and I am having a hard time figuring out how to do this from the available documentation.

It started out trying define a custom Data Adapter based on an implementation of JRDataSourceProvider, but I cannot figure out how to configure it (e.g.: with URL and credentials). And even if I could, how do I get parameters from the report context to get the right data?

I made a custom JRQueryExecutor and got it registered via a custom ExtensionsRegistry. I can put my configuration (URL, credentials) in the report parameters, but that configuration should not have to be done per-report, it should come from a Data Adapter (studio terminology).

It seems like I should have a custom Data Adapter, and that it should be available to my JRQueryExecutor, but I do not see how to do this.

Can somebody point me in the right direction?

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

I made a custom data source with a ReportDataSourceService, based on the Webscraper example. I can create the data source and run the report. But how do I get it to prompt for parameters, and make those parameters available to my JRDataSource?

 

In my JRXML, I have, in the :

 

I do not get prompted for "xxx, and I do not see them in the parameter map passed to ReportDataSourceService.setReportParameterValues(Map).

Link to comment
Share on other sites

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...