COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Active Reports => Topic started by: sujitgouda on 14 Jul 2014 04:49:22 PM

Title: Sorting in active reports
Post by: sujitgouda on 14 Jul 2014 04:49:22 PM
I have 2 fields for Gross and Net and a slider for MTD and YTD.
By default I have sorted the list to MTD Gross as descending.

Is it possible to sort also on YTD Gross in descending when we change the slider from MTD to YTD ? 

Currently I am losing the sorting on the gross field when I move the slider.


Title: Re: Sorting in active reports
Post by: mondans.sureshbabu on 16 Jul 2014 12:23:13 AM
What is your report spec. ? Are u maintaining a deck for MTD and YTD and based on your selection the data card comes up ? How is that you display the MTD and YTD values based on selection.

Based on that we can figure out what is the approach to be taken.

-Suresh
Title: Re: Sorting in active reports
Post by: sujitgouda on 16 Jul 2014 09:27:38 AM
Its a single list containing fields like "Person Name| MTD Gross | MTD Net | YTD Gross | YTD Net"
I am using a static tab control to toggle between MTD and YTD values and hiding them accordingly.
Title: Re: Sorting in active reports
Post by: MFGF on 16 Jul 2014 09:38:17 AM
Quote from: newb2cog on 16 Jul 2014 09:27:38 AM
Its a single list containing fields like "Person Name| MTD Gross | MTD Net | YTD Gross | YTD Net"
I am using a static tab control to toggle between MTD and YTD values and hiding them accordingly.

Hi,

That doesn't quite make sense to me. How can you have a single list on two different tabs of a tab control?

MF.
Title: Re: Sorting in active reports
Post by: sujitgouda on 16 Jul 2014 09:40:38 AM
Those are static tab controls to just set variables in the list to show and hide columns.
like when the user toggles on MTD, only person name|mtd gross|mtd net is shown
whereas a switching to YTD will show person name|ytd gross|ytd net
Title: Re: Sorting in active reports
Post by: MFGF on 16 Jul 2014 11:24:38 AM
Quote from: newb2cog on 16 Jul 2014 09:40:38 AM
Those are static tab controls to just set variables in the list to show and hide columns.
like when the user toggles on MTD, only person name|mtd gross|mtd net is shown
whereas a switching to YTD will show person name|ytd gross|ytd net

If you only have one list, you can't alter the sorting - this is defined when the MHT file is rendered. The best appraoch is to have two versions of the list - one on each tab of the tab control. Then you don't need to worry about hiding and filtering - you simply display the desired list by switching to the tab it lives within.

Cheers!

MF.