Project

General

Profile

Defect #498

Subreport connection-expression fails

Added by Marco Rossi about 12 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
High
Start date:
04/19/2012
Due date:
% Done:

0%

Estimated time:
Browser (if web client):

Description

I'm using a Main report with a Subreport. This Subreport shows data from another database so I've passed a java expression as connection-expression:

<connectionExpression><![CDATA[java.sql.DriverManager.getConnection("jdbc:postgresql://localhost:5532/myOtherDB", "DBA", "")]]></connectionExpression>

Into iReport it works fine but it doesn't into servoy smart client.
I've tried also to replace the jasper library with the new one version 4.5.1 but the behavior remains the same.

History

#1

Updated by Marco Rossi about 12 years ago

  • Assignee deleted (Andrei Costache)
#2

Updated by Andrei Costache about 12 years ago

  • Assignee set to Andrei Costache
#3

Updated by Andrei Costache over 10 years ago

  • Status changed from New to In Progress

Hi Marco,

Is this problem still present, or have you got around it or upgraded to a different setup?
If it still occurs, please let us know.

Best regards,
Andrei

#4

Updated by Andrei Costache over 10 years ago

  • Status changed from In Progress to New
#5

Updated by Andrei Costache over 10 years ago

Hi,

Any updates regarding this issue?
Reading this description and the forum post, I am not sure I understand: does this work in the Developer started smart client or only in the Application Server smart client? Better, in which situation is this a problem, in both?

Have you tried with the standard versions, latest, of the plugin (3.3.x and 4.x/head?

Thank you.

Best regards,
Andrei

#6

Updated by Andrei Costache about 10 years ago

Hi,

Not sure if this is still applicable, but posting a possible solution - this implies changes to the report itself to reference a different datasource and also adding the necessary jdbc driver to the classpath of the application (of Developer):
- in the report itself, create a parameter (for example here, we'll call it connectionParam), that is of class type java.sql.Connection and that has a default value of java.sql.DriverManager.getConnection("jdbc:postgresql://localhost:5532/myOtherDB", "DBA", ""). Then inside the subreport connection expression reference this report parameter: <connectionExpression><![CDATA[$P{connectionParam}]]></connectionExpression>
- make sure the jdbc driver is in the classpath of the client as well (so if you are using a debug smart client make sure the driver jar is in the servoy_jasperreports plugin folder)

This should make this scenario work.

Hope it helps,
Andrei

#7

Updated by Andrei Costache about 10 years ago

  • Status changed from New to Closed

Also available in: Atom PDF