As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
How to connect to external database in a Birt report runned in nuxeo ? Definitions included in *.rptdesign files are ignored and BirtEngine connects only to Nuxeo database.
Best regards Adam
In the method getNuxeoReport of the class ReportHelper it should be included:
for (Iterator i = designHandle.getDataSources().iterator(); i.hasNext();) { OdaDataSourceHandle dsh = (OdaDataSourceHandle) i.next(); (+)OdaDataSource ds = (OdaDataSource) dsh.getElement(); (+)Module root = ds.getRoot(); (+)String odaJndiName = (String) ds.getProperty(root, "odaJndiName"); (+)if (odaJndiName == null || odaJndiName.isEmpty()) (+){ String singleDS = Framework.getProperty( "nuxeo.db.singleDataSource", null); if (singleDS != null && !singleDS.isEmpty()) { (-)OdaDataSource ds = (OdaDataSource) dsh.getElement();
This code checks if there is the "odaJndiName" property in a report and use it. Otherwise, it runs as usual.
All the best.