Jump to content
We've recently updated our Privacy Statement, available here ×

How to reference in a subreport a dataSource in jasperserver


gustavofarias

Recommended Posts

I have a master report that uses a MongoDB data source, and uses a field as parameter to a subreport to retrieve some more data.
The problem is that the subreport doesn't share the same data source as the master. The subreport should connect to Oracle.

I already have an Oracle data source in Jasper server but I'm unable to reference it in the subreport, or pass it to the subreport in the master report code.

I tried "repo:/path/to/dataSource", but it doesn't work saying that a String is not a data source. Which makes sense. So, how can I reference a datasource in a expression?

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

The Jaspersoft Studio documentation discusses how to provide different data sourtces to a subreport (Scroll down to the "Specifying the Data Source" section."

https://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-user-guide/v790/understanding-subreports 

Other articales that may help:

https://community.jaspersoft.com/questions/1145546/defining-different-data-source-subreport 

https://community.jaspersoft.com/questions/951636/subreport-close-connection 

Or search for "subreport different data source" in the Jaspersoft community.

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