[Reporting] OpenMRS Configuration and System data in a report

I would like to be able to add some addition information into a report which are not related to indicators or data sets for example

  1. Value of a global property

  2. System property from the implementation -System parameters, Module build version

How can I add these to an Excel template so that they are added to the report

Thanks in advance

@ssmusoke, the best way to do this would be to add these to a new data set within your report, and then you would have access to this data within your Excel template just like any other report data.


@mseaton What kind of data set definition do I use for such data?

@mseaton any pointers which dataset I could use? any exmpale worked on? was trying this, but got lost

@ssmusoke, I would just create a custom DataSetDefinition and corresponding evaluator yourself. You can have 0-N configuration properties on the definition (based on how configurable you want to make it), and then you simply need to implement the “evaluate” method on your evaluator and construct and return a SimpleDataSet that contains the data of interest.

You can see an example of a custom dataset/evaluator that was written here.


1 Like