COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Bonediggler on 08 Aug 2016 05:53:59 PM

Title: Query Joins & Sorting
Post by: Bonediggler on 08 Aug 2016 05:53:59 PM
Hello experts -

I have a little requirement here to join two queries with exactly the same data (would be a self-join if that were allowed) in order to create a calculated field.  The success of said calculated field depends on both queries being sorted the same way.  After hours of banging my head I came to the realization that the queries were not sorting the data in any particular way, hence the values of the calculated field were way off.  Not sure why I thought they would sort themselves, but anyway...

The question is, how do I define a sort order for a query that is not the query used by the list/report...?

Thank you!
Title: Re: Query Joins & Sorting
Post by: AnalyticsWithJay on 09 Aug 2016 07:05:11 AM
You can use the "pre-sort" property in Report Studio. Select the field you're looking to sort and set the pre-sort property accordingly.