Link to home
Start Free TrialLog in
Avatar of Sam2009
Sam2009Flag for United Arab Emirates

asked on

DYNAMICALLY SORTING COLUMNS IN COGNOS REPORT STUDIO

i HAVE TWO COLUMNS BRANCH CODE , STAFF CODE AND SALARIES OF STAFF.  IN MY REPORT OUT PUT I HAVE TWO RADIO BUTTONS IN THE PROMPT FOR ASCENDING AND DESCENDING. SO WHEN I SELECT ASCENDING, MY REPORT SHOULD BE IN ASCENDING ORDER OF SALARY AND VICE VERSA WHEN I SELECT DESCENDING...

I HAVE DONE IT BY CREATING A DATA ITEM..AND  USING STATIC VALUES 1 AND -1... BUT I WAS TOLD THAT IT IS NOT THE OPTIMAL SOLUTION...PLEASE SUGGEST AN OPTIMAL SOLUTIONS

REGARDS
SAM
ASKER CERTIFIED SOLUTION
Avatar of SNeupane
SNeupane
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sam2009

ASKER

Hi
Thanks for the genuine reply...but is there a way to do without creating separate lists..

Regards
Sam
Your approach is okay if you want to do in the same list.
Anytime sorting is changed, the query is different so regardless, the query will be sent to the db and cached results won't be used.
You can also duplicate the sort column and sort one asc another desc.
Then use a conditional variable to render one depending upon the selection.