COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: sophiadevi on 09 Jul 2014 08:03:22 AM

Title: Dynamic Sorting by column header in list report
Post by: sophiadevi on 09 Jul 2014 08:03:22 AM
Hi All,

I am looking for achieving dynamic sorting of multiple columns on click of list column headers(multiple data types-datetime,integer,varchar).
It would be of great help if someone could share the xml code for cognos 10, if available.

Thanks in advance.
Title: Re: Dynamic Sorting by column header in list report
Post by: Grim on 09 Jul 2014 08:34:51 AM
Dynamic sorting of a list...
http://www.ibm.com/developerworks/data/library/cognos/reporting/scripting_techniques/page515.html

Title: Re: Dynamic Sorting by column header in list report
Post by: sophiadevi on 09 Jul 2014 09:43:36 AM
Hi Grim,

Thanks.
Are there any other options by which you can achieve the same without modifying server files?

Thanks.
Title: Re: Dynamic Sorting by column header in list report
Post by: Grim on 09 Jul 2014 09:52:06 AM
Quote from: Scognos on 09 Jul 2014 09:43:36 AM
Hi Grim,

Thanks.
Are there any other options by which you can achieve the same without modifying server files?

Thanks.

Might be able to use this javascript way...YMMV
https://www-304.ibm.com/support/docview.wss?uid=swg21343332
Title: Re: Dynamic Sorting by column header in list report
Post by: Lynn on 09 Jul 2014 10:07:59 AM
Or use drill through:

http://www-01.ibm.com/support/docview.wss?uid=swg21397882
Title: Re: Dynamic Sorting by column header in list report
Post by: Michael75 on 09 Jul 2014 12:58:37 PM
The more, the merrier, so, to add to Lynn's suggestion, here's another (rather old) drill through technique.

Haven't tried it myself, just found it in my archives. Attachment rather than URL because the latter is (was):

http://support.cognos.com/supported/supportlink/techniques/ta_0706_03.html (http://support.cognos.com/supported/supportlink/techniques/ta_0706_03.html)
Title: Re: Dynamic Sorting by column header in list report
Post by: navissar on 09 Jul 2014 02:56:57 PM
I'll pile one more. If you're on 10.2.1 FP1 and up:
http://www.linkedin.com/groups/Want-Dynamic-Sorting-in-Cognos-136893.S.5808065738367315968 (http://www.linkedin.com/groups/Want-Dynamic-Sorting-in-Cognos-136893.S.5808065738367315968)
Title: Re: Dynamic Sorting by column header in list report
Post by: sophiadevi on 09 Jul 2014 11:39:36 PM
Hi Everyone,

Thanks a lot for u'r guidance.
I tried and have successfully implemented it via drill through technique.

Thanks.
Title: Re: Dynamic Sorting by column header in list report
Post by: sophiadevi on 11 Jul 2014 02:16:17 AM
Hi All,

After implementing above drill through logic, I see that the list data is sorted desc when first clicked on. changes to asc on re-click.
Can you please help me getting the data sorted out other way round. (1st click- asc, 2nd click-desc).

I think it should be a small change , but seeking your help for the above.

Thanks