How to reference in a subreport a dataSource in jasperserver

0

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:

0

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

Other articales that may help:

https://community.jaspersoft.com/questions/1145546/defining-different-da...

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

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

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