COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Framework Manager => Topic started by: ganesansgi on 24 Jan 2006 09:51:01 PM

Title: Sort column using alternate sort sequence column
Post by: ganesansgi on 24 Jan 2006 09:51:01 PM
Is it possible to assign an alternate sort sequence to a columns in the model.
For example, I am showing sales by region and want to sort the output by
a predefined sequence instead of alphabetical order.Ã,  And, I want this
sort sequence to be automatically applied when the user chooses theÃ, 
Region column in the Query studio.

Thanks in advance
Title: Re: Sort column using alternate sort sequence column
Post by: CoginAustin on 25 Jan 2006 03:03:34 PM
Add a new query item that has a CASE statement to figure out your new sort order.

Example

CASE [Field]
WHEN 'Abc'
THEN 'Group 1'
When 'Def'
THEN 'Group 2'
ELSE
'Catch All Group'
END
Title: Re: Sort column using alternate sort sequence column
Post by: ganesansgi on 26 Jan 2006 01:52:25 PM
Let me rephrase my question so that I am being clearer.
In the framework manager, while defining a query subject
can I assign a different sort field for the query items. I want
a query like this to be generated

select region_name 
from region_dim
order by region_sort_sequence
Title: Re: Sort column using alternate sort sequence column
Post by: CoginAustin on 26 Jan 2006 02:43:54 PM
Sort order is dictated by the report using the model not the model the report uses.
Title: Re: Sort column using alternate sort sequence column
Post by: KevH on 08 Sep 2006 07:07:20 AM
Did you ever resolve this issue? I am suffering from similar in that the use of a sequence order element to sort by has been rejected by our business community. They want the sort to be implicit when the item is selected in a query studio report.

Any help would be greatly appreciated.

Kevin.