Idempiere integration Jasper Reports and subreports different connection

367 views
Skip to first unread message

Gustavo Crespo

unread,
Sep 1, 2016, 10:30:06 AM9/1/16
to iDempiere
Hi,

I got a problem with integration idempiere with JasperReport which has a report and subreport where 
Main report performs sql query at same DB idempiere
Sub report performs sql query at different DB idempiere 
I'd followed suggestion JasperSoft community http://community.jaspersoft.com/wiki/multiple-datasources-ireport-lists-tables-and-subreports and it works in Ireports 5.6.0 but in idempiere it throws stack like that :

DriverManager.getConnection("jdbc:oracle:thin:@XXX.XXX.XXX.XXX:1521:ALS")
    trying sun.jdbc.odbc.JdbcOdbcDriver
*Driver.connect (jdbc:oracle:thin:@xxx.xxx.xxx.xxx:1521:ALS)
    skipping: java.sql.DriverInfo
getConnection: no suitable driver found for jdbc:oracle:thin:@XXX.XXX.XXX.XXX:1521:ALS
java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@XXX.XXX.XXX.XXX:1521:ALS
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at introduccionProductos_1472685414964_195263.evaluate(introduccionProductos_1472685414964_195263:240)
at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:250)
at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:611)
at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:579)
at net.sf.jasperreports.engine.fill.JRFillDataset.setFillParameterValues(JRFillDataset.java:996)
at net.sf.jasperreports.engine.fill.JRFillDataset.setParameterValues(JRFillDataset.java:637)
at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.ja



Any help would be appreciate.

Hiep Lq

unread,
Sep 2, 2016, 8:26:44 AM9/2/16
to iDempiere
idempiere base on Osgi, so not sure you can get connection from other bundle like you do now.

idempiere also don't support on fly muilti database,

but don't scare, it's opensource, so you can easy modify ReportStart class to adapt your requirement. 

most easy but not advice, you can add jdbc library to bundle have ReportStart class to try.

Denis González

unread,
Sep 6, 2016, 1:13:58 AM9/6/16
to idem...@googlegroups.com
You could also try to solve that at the database level. Before designing the report. You can get the "foreign data" mapped to your actual "idempiere database" using Foreign Data Wrappers if you are using postgres. I guess there is something like that in oracle if that is the DBMS you use.


--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/7032b59c-d00f-4277-87be-bab4f38cb78a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages