1.7A 5465 history: wrong order

The new history:medication(openvpms:get(.,'patient.entity'), 'Vaccinations') function is returning data oldest first (ie date ascending). The documention (http://www.openvpms.org/documentation/csh/1.7/reference/jxpath#history) says it should be descending.

[I need it in descending (newest first) order. If the iReport sort function worked I could reorder - but it does not.]

Please can I have it corrected to come out in newest first order.

Regards, Tim G

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: 1.7A 5465 history: wrong order

The history:medication() function should be returning the items in descending order.

If you based your sub-report on the SamplePatientFormItems.jrxml, then there will be a:

<sortField name="startTime"/>

which wil be overriding that returned by the function. You can either remove this line from the .jrxml, or in iReport:

1. in Report Inspector, right click on the top-level node.

2. click Edit Query

3. click Sort Options.

4. in the Sort Options dialog, remove startTime

 

Regards,

-Tim A

Re: 1.7A 5465 history: wrong order

Ahah! you are correct [I knew the sort was there but didn't think it was doing anything because I could not explicitly set to the ascending or descending  and it was defaulting to ascending.] I removed the sort and bingo it is working.

Note that I have updated http://www.openvpms.org/documentation/csh/1.7/admin/lookup/macroReport and http://www.openvpms.org/documentation/csh/1.7/reference/jxpath to explain about when you cannot use $xxx.

Regards, Tim G

Syndicate content