The JXPath expression passed to method
of org.openvpms.report.jasper.DataSource cannot access report parameters.
This prevents passing parameters to subreports. e.g.
This type is of expression is required to replace:
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.