How to reference in a subreport a dataSource in jasperserver


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?

gustavofarias's picture
Joined: May 22 2012 - 7:10am
Last seen: 1 day 3 hours ago

1 Answer:


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

Other articales that may help:

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

sanderse's picture
Joined: Jul 31 2017 - 3:51pm
Last seen: 6 hours 48 min ago