How to change the sorting order in Jaspersoft 6.3 (CABI 6.3) from selections within a Global Collection.

Document ID : KB000016591
Last Modified Date : 14/02/2018
Show Technical Document Details
Question:

When running a group report from Jaspersoft 6.3 (CABI 6.3) with Spectrum 10.2.x and selecting criteria from a Global Collection, why is the sorting order of the results not in alphabetical order?  How can we change this?

Environment:
Spectrum 10.2.xJaspersoft 6.3
Answer:

The Global Collection sorting order can be changed to Alphabetical Order by following these steps.

Steps to change the order of Global Collection input control window.
A) Login with superuser.
B) Now go to View - Repository.
C) Now navigate to root - Organizations - spectrum - capability - inputcontrols - common - single select .
D) Now choose $R{p_globalCollection_KEY} and click on 'Edit'.
E) Now Next - Next - Next - Next
F) Now Enter the following query in Query String text box.
"select distinct gc_rec_ID,gc_name from globalcollection ORDER BY gc_name ASC"
G) Now click on save - Submit.

 

If you login as a user and run a new report the sorting order should now be in Alphabetical order.