Jump to content
Changes to the Jaspersoft community edition download ×

Usage of an other DataSource


Recommended Posts

By: Johann Rosner - xsare

Usage of an other DataSource

2006-05-23 05:38

I can fill a ordinary JasperReport with a Java-Object: JRDataSource (Interface).


Is it able to fill the reports for the JasperServer manually (no JDBC/JNDI DataSource).


I need this, if I wont to preprocess the data to display!


I hope for your help,



Johann Rosner




By: Sherman Wood - sgwood

RE: Usage of an other DataSource

2006-05-23 06:36

At this time, we have only included JDBC and JNDI data sources. We need to do some work to allow other data sources to be attached to reports, defining the metadata about the data sources and the machinery to connect to them. This will need to be pluggable, so that people can plug their own data sources in.


This work is not going to be done for the release in June, but definitely the release after that in July/August.





Link to comment
Share on other sites

  • 2 years later...
  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

How would one post process/preprocess data?  I have a report that I can't solve with just SQL.  I've looked into datasource, scriptlet, and query executor, but I can't seem to read the report parameters.  Ideally, I would want to read the REPORT_CONNECTION and other user parameters, call the DB directly, and then dump out some kind of processed (with my Java code) result set for reporting.

Link to comment
Share on other sites


Thanks for the quick reply.  Anyways, is query executor "the one" to use when it is necesary to dynamically generates the result set?  Is that supported in the newest JasperServer, as I am working with one that only says, "Copyright © 2000-2008 JasperSoft Corporation".  While browsing the 3.5 documentation, I've found JRFillDatasetScriptlet.  What is it?

Link to comment
Share on other sites



Anyways, is query executor "the one" to use when it is necesary to dynamically generates the result set?

Actually if you plan to deploy your reports in JasperServer, you should start by looking into custom data sources.  Check the user guide and the samples shipped with JS for information on how this works.

As part of the custom data source implementation, you might or might not need to implement a query executer as well.  This mainly depends on whether you need to embed queries in report or not.

Regarding JRFillDatasetScriptlet, that's a class which is internally used by JasperReports during the report fill process.  It can't help you.



Link to comment
Share on other sites


Many thanks again.  I was able to do what I need using the query executer.  Originally, I was trying to solve the problem with a custom datasource, but I was not able to read the parameter values.  The JRDataSourceProvider.create() method only sends in a JasperReport instance, and that means I can only get JRParameters out of it.  I've checked to see if they can be up cast to JRValueParameters, but they can't.   Without parameters, I would have to create the JDBC connection myself, which is highly non-portable.  Also, without reading any parameter, I can't get my report's input anyways.

Regardless, it seems to be working, and now I have to figure out how to move my report from Netbeans to JasperServer. ;)


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