I cannot seem to get a Date filter to work that uses conversion routines. The schema which I'm reporting against stores all dates as OLE automation dates (double precision floating point). I have a static utility function, DateTime MyLib.Utilities.FromOADate(Nullable<Decimal> dt) which wraps the System.DateTime.FromOADate() routine and exposes it to the report. This way, in the report I can use an expression, e.g.={MyLib.Utilities.FromOADate(Fields.[StartDate])}. This seems to work correctly for report output.
When I try to setup a filter for start date using a similar method, I get an error 'Cannot apply >= to types System.DateTime and string'. When I use the expression editor, the expression created is:
=MyLib.Utilities.FromOADate(Fields.[StartDate]) (without the {}'s, adding them seems to be a syntax error )
My filter definition looks like:
Expression Operator Value
=MyLib.Utilities.FromOADate(Fields.[StartDate]) >= =Parameters.Parameter1 (DateTime)
=MyLib.Utilities.FromOADate(Fields.[StartDate]) <= =Parameters.Parameter2 (DateTime)
I've barely started to look into Telerik Reporting so I may be missing something obvious. Any help would be appreciated.
Thanks,
Josh