We're updating the issue view to help you get more done. 

Enable DataSource.getExpressionDataSource() to access report parameters

Description

The JXPath expression passed to method

1 JRRewindableDataSource getExpressionDataSource(String expression)


of org.openvpms.report.jasper.DataSource cannot access report parameters.
This prevents passing parameters to subreports. e.g.

1 $P{dataSource}.getExpressionDataSource("$OpenVPMS.patient")

This type is of expression is required to replace:

1 $P{dataSource}.getDataSource("patient")

which fail in custom Medical Records reports that change the record order. E.g if the record order puts an Investigation Version first in the patient history, the report fails, as the version record has no patient node.
By using getExpressionDataSource("$OpenVPMS.patient"), the current patient is always available to the report.

Environment

None

Status

Assignee

Tim Anderson

Reporter

Tim Anderson

Labels

None

Fix versions

Priority

Minor