COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: akhattri on 21 Sep 2009 11:12:20 AM

Title: Sort in HTML
Post by: akhattri on 21 Sep 2009 11:12:20 AM
Hello,

Is there any way we can sort the HTML output of the report in Report Studio after the report is run? I know we can do it during the report creation process, however, what if the user runs the report & then afterwards wants to sort it by some other column.

Thanks for your input.
Title: Re: Sort in HTML
Post by: kaevne on 21 Sep 2009 01:15:40 PM
There is definitely a way, but it's not visually pretty.  I remember doing this in the report studio advanced class.  I'll dig it up if no one else answers in a few days.
Title: Re: Sort in HTML
Post by: vinu on 22 Sep 2009 02:36:57 AM
You can achieve this by using Java script.
Rgd's
Venu
Title: Re: Sort in HTML
Post by: angela on 22 Sep 2009 04:09:12 PM
There are old instructions I wrote at http://it.toolbox.com/wiki/index.php/Dynamically_sort_columns%2c_no_code_required%2c_c8 (I don't think the code works anymore but the instructions should still work).  The  main thing to remember is that it WILL re-run the query.
Title: Re: Sort in HTML
Post by: kaevne on 24 Sep 2009 09:24:20 AM
I found the instructions, It's what angela posted.  you create an auto-submit value prompt on your report.  you can place it next to the column if you like.  The value prompt contains static choices that point to a sort key for the column, I'm sure you can figure it out from there.

Unfortunately, this looks VERY ugly and is not a simple click and sort.  However, i can see why that functionality doesn't exist as a link because Cognos uses links as drill-downs.
Title: Re: Sort in HTML
Post by: ExchangeMe on 24 Sep 2009 01:43:31 PM
IBM/Cognos has a method on their website for sorting any column. Its for version 8.2 and its pretty neat looking using some java script they wrote. Heres the site: http://www.ibm.com/developerworks/data/library/cognos/page201.html
Hope this helps.