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

Change Subreport Connection


marcosmalfatti

Recommended Posts

Hello!

I have a problem....

I make a report (1) with Oracle Database, I testing this report and it working fine.

I make another report (2) with MySQL Database, I testing this report and it working fine.

The problem occours when I put report 2 as subreport from report 1. If I use "Same Connection", the report 2 try connect with Oracle, if I use "Not Use Connection or Datasource", the report 2 is blank.

Then, i need make a subreport assume another database connection, how I do it.

 

Thanks for all

 

 

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 months later...

How exactly do you 'create a connection parameter in the master report' ? I mean what does your parameter expression look like?

 

I spent all day looking for an answer for this yesterday and this morning I found an answer on the JasperServer forums: http://jasperforge.org/plugins/espforum/view.php?group_id=112&forumid=102&topicid=41378

 

The resulting XML should look like this :

Code:

 

This puts the connectionExpression in the master report under the subreport section.

 

I tried creating a parameter (using iReport 3.5.0) and putting the expression in there and then using that parameter under the 'Use Connection Expression'. But I ended up with syntax problems so I just put the expression straight into the subreport section.

 

I also note that the post on the JasperServer forum says that this is possibly going to lead to pool resource problem because the connection is not managed by the server. And a request was logged in 2008 to add better capability into the JasperServer but this is not scheduled to happen.

 



Post Edited by Glen Bremner-Stokes at 03/27/09 12:31
Link to comment
Share on other sites

  • 10 years later...

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