Bahmni concatenated type report is not working for different data source reports

reports
bahmni-reports
Tags: #<Tag:0x00007efd1a221f00> #<Tag:0x00007efd1a221d70>

(Saikumar Vantaku) #1

Bahmni reports have a “concatenated” type of configuration to get a combined report containing different child reports inside. You can find more information here

We found a bug in this feature. If we configure a concatenated report with 2 child reports inside, where one is OpenElis report and the other is OpenMRS report, in this case, the report which should run on OpenElis database fails with an error whereas OpenMRS database report works fine.

Actually, it’s trying to execute all report queries on the OpenMRS database if it’s a “concatenated” type one. It’s not considering “type”(useful to find the data source) property of each child report.

This is the configuration we used to make the concatenated report that fetches data from 2 different DBs.

  1. Are we missing any needed configuration?

  2. Is there any way to achieve this kind of concatenated report from two different databases? @angshuonline @pramidat @swathivarkala @binduak @sumanmaity112 @mksd @ramses


(Dimitri R) #2

Ok so I’m not familiar with this type of configuration at all, but I looked quickly through the code base and found this.

It looks like that while there can be multiple reports to concatenate (reports can be an array with a size > 1), there is always only one connection to the database. So at first sight it looks like your use case is not supported. @angshuonline might confirm this.


(Suman Maity) #3

Currently, the code is written in such a way that all the concatenated reports are only run on OpenMRS database (please have a look into this). To make it work we have to implement it. We have to write in such a way that it’s backwards compatible.