Suppose you want to run a report directly via a URL, you can now do this in Reporting 0.11.0. It supports the passing of parameters as specified in the URL.

Parameters

The parameters that this supports are:

In addition, any parameter of the report definition can be passed in as an additional request parameter, where the value is in the format that can be parsed by htmlwidgets. This generally means that metadata needs to be passed as a uuid, and dates should be in the format yyyy-MM-dd.

Example URLs

The following are examples of URL's showing the use of parameters. This first example shows a generic URL.

http://localhost:8080/openmrs/module/reporting/reports/renderReport.form?reportDefinition=c037ad86-d3ed-461b-86d5-f0f2c1c89d86&patient=85ffa50c-bcf4-48ea-89ce-47617fbdbcdb&renderingMode=org.openmrs.module.reporting.report.renderer.TextTemplateRenderer!40b601c5-a801-4691-a7df-1c0ee0232a6e

This second example shows a URL used in HTML Form Entry with the <redirectOnSave> tag. Notice the amperstand (&) is replaced with &amp;

<redirectOnSave url="/module/reporting/reports/renderReport.form?reportDefinition=76cfc87a-9e88-4d39-acc7-ed68d4beb1f7&amp;patient_wanted={{patient.id}}&amp;renderingMode=org.openmrs.module.reporting.report.renderer.TextTemplateRenderer!d45c199d-c004-4ee4-aa8d-6a8061d7d9a5"/>


Related articles

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.

Related issues