COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: sspk on 31 Mar 2008 02:54:57 PM

Title: sorting problem
Post by: sspk on 31 Mar 2008 02:54:57 PM
Hi All,
I have a prompt on a date and when i am running the report it's prompting for the date values but the problem it is showing the values in irregular manner.I did sort by ascending all those stuff but no use.
I need to see the dates in ascending order.Please it is urgent any suggestions will help me a lot
Title: Re: sorting problem
Post by: almeids on 31 Mar 2008 03:07:19 PM
Is the data item you are sorting on an actual date or a text representation of a date?  You need to make sure any sorting is based on an actual Date data type, otherwise for example you may get April sorting before January.  If you need to use a formatted text item in your report for some reason, add the date item on which it is based to your query, sort on the date, and display the text.
Title: Re: sorting problem
Post by: sspk on 31 Mar 2008 03:37:13 PM
Quote from: almeids on 31 Mar 2008 03:07:19 PM
Is the data item you are sorting on an actual date or a text representation of a date?  You need to make sure any sorting is based on an actual Date data type, otherwise for example you may get April sorting before January.  If you need to use a formatted text item in your report for some reason, add the date item on which it is based to your query, sort on the date, and display the text.

Hi ,thank you very much.
The date(follow-up date(varchar2(20)) data item has some null values also.so i am prompting like this follow-up date in(?MYDATEPROMPT?).So when i am running the report it's giving the values like what you have said i.e.
01-APR-08
01-DEC-08
01-JUL-08
03-APR-08
03-MAR-08
08-APR-08
08-MAR-08
08-DEC-08..........
Can you explain it clearly( i am new to this).what to do in step by step