How to changing the Sort order in COGNOS



When you are creating COGNOS reports, you want to sort the fields ascending or descending order. Instead of using sort tool in tool bar, we can use case statement and do the sorting functionality.
Sort Tool:-

First of all drag and drop the field in to list, which is you want to sort. Then go to the relevant query which is related to the list and go to that query in the Query Explore and select the query.


Then select the Tool box tab and drag and drop the Data item to the Data item to the query.




Then appear the Data item expression window and insert the CASE statement to expression definition box as below



Click the ok and rename the data item name as relevant way in the Data item property window.





Then go to the Page explore and select the edit layout sorting…..



Drag and drop the created data item (MySorting) as below.




According to the case statement value1 will be displayed as the first value. then will display the value2, value3, value4, value5 and value6 in the list
How to changing the Sort order in COGNOS How to changing the Sort order in COGNOS Reviewed by Pubudu Dewagama on 9:49:00 PM Rating: 5

No comments: