Monday, March 12, 2012

Interactive Sort on date field

I have an RS 2005 June CTP report where the data source is an MDX query against AS 2005 June CTP. I'm using Interactive Sort on several columns and it's working fine for the numeric and string fields, but it's sorting the date columns alphabetically instead of chronologically. Is there a way I can specify that these fields are date fields and should be sorted chronologically?
Thanks,
Dirk

Most likely the date field is returned as string through the provider. Try to explicitly convert it with the CDate(...) function in the sort expression. E.g. =CDate(Fields!OrderDate.Value)
-- Robert

|||That did the trick, thanks for the help.|||

I'm also using Interactive Sort on several columns in MSRS 2005,
my problem is with sorting the currency columns (columns with $ sign) - it doesn't work, dallor ammounts are not sorted in accending/decending order. Is there a way I can specify that these fields be sorted as numbers?

Thanks!

|||

It sounds like you are sorting on strings (because the underlying dataset field contains a string rather than a numeric value).

You should sort on a numeric value of the dollar amount - e.g. by changing the dataset query to return the numeric value instead of the string. You can then still apply the currency formatting in the report by using the Format property on textboxes and set it to e.g. C0 (for currency formatting with zero decimals)

-- Robert

No comments:

Post a Comment