If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Date sorting show empty/blank date last

Started by Cognos Talk, 24 Feb 2016 07:13:10 AM

Previous topic - Next topic

Cognos Talk

is there any command in cognos to show/sort/order by  empty date last when sorting.
I have seen couple of order and sort commands but cannot manage to make it work on relational source.

Thank you,

BigChris

Not as such, but you should be able to achieve the same output by creating another field in the query and sorting on that:

if([DateField] is missing) then (2099-12-31) else ([DateField])

or

if([DateField] is missing) then (1900-01-01) else ([DateField])

depending on the sort sequence and whether you want the blanks to be at the top or the bottom of the report.

Cognos Talk

thank you very much for your reply I will try it now and let you know if it worked. Then I can probably apply conditional formatting and hide that dummy date

BigChris

Hi, you shouldn't have to bring that column in to the report in order to sort on it, so you wouldn't need to conditionally hide the dummy dates. Click on your table and in the properties pane go to Grouping and Sorting. You should then be able to sort on your new calculated field instead of your original DateField.

Cognos Talk

Hello,
thank you very much for your suggestion it worked perfectly!!!

BigChris

Excellent - glad that sorted it for you  ;D

Cognos Talk