COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: mohsin2010 on 04 Jan 2011 10:33:22 PM

Title: All Possible Type Of Sorting in Report Studio.
Post by: mohsin2010 on 04 Jan 2011 10:33:22 PM
HI,
    can any one tell me that how many type of sorting can we do in Report Studio.. . Reply soon  :(

Thanks in Advance.
Title: Re: All Possible Type Of Sorting in Report Studio.
Post by: blom0344 on 05 Jan 2011 02:46:05 AM
hmm.. Type of sorting. Wonder what you mean by this. Anyway, you can specify sort order in the query definition and in the report object. Without setting sort orders you may notice Cognos tends to implement implicit ordering of data based on the position of dataitems in an object. Grouping will also introduce implicit ordering of data..
Title: Re: All Possible Type Of Sorting in Report Studio.
Post by: mohsin2010 on 05 Jan 2011 02:56:57 AM
Thanks blom0344 ,
                           i mean to say that we can do many sorting using query but after the report is created and during the report creation do we have any option to sort our report automatically with out using query ?
Title: Re: All Possible Type Of Sorting in Report Studio.
Post by: blom0344 on 05 Jan 2011 09:47:51 AM
You can apply a sort within the report. There is a seperate icon in the menu that becomes active when you select a column within a reporting object (allowing for a simple ordering (asc/desc) and advanced sorting)
Title: Re: All Possible Type Of Sorting in Report Studio.
Post by: Lynn on 05 Jan 2011 10:12:15 AM
If you want to allow the user to select a particular item to sort on you can create a query item (e.g., sortKey) that populates a value based on the user's answer to the prompt. Then use that sortKey item in the advanced sorting.

There are java script approaches to dynamically sort HTML output, but I avoid JS where possible for a few reasons.

There is also a method using drill through back to the report itself that allows dynamic sorting by clicking on column headings for HTML output. Attached is something I wrote up on this technique. Of course it is re-running the report each time so keep performance in mind before jumping into this pool...

All of these things require that you know the different types of sort options you want to support so you can code for those scenarios.