cancel
Showing results for 
Search instead for 
Did you mean: 

Birt - data from external database

adam_bo_
Star Contributor
Star Contributor

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

1 REPLY 1

adam_bo_
Star Contributor
Star Contributor

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.

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.