Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Problem with Filtering on Tablix control using datetimeoffset data type Expand / Collapse
Author
Message
Posted Thursday, August 28, 2014 10:32 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, December 23, 2014 6:11 AM
Points: 60, Visits: 77
We recently changed the datetime columns in a client's database to datetimeoffset. There is an existing report with filters on the tablix control, and filters on grouping, which compare a column returned from the dataset with a parameter. In this instance the dataset column used to be of type datetime, but now is of type datetimeoffset, while the parameter is of type datetime (as Report Builder 3.0 doesn't provide a datetimeoffset type).

When I first run the report I get an error:

The processing of FilterExpression for the tablix ‘Tablix1’ cannot be performed. Cannot compare data of types System.DateTimeOffset and System.DateTime. Please check the data type returned by the FilterExpression. (rsComparisonTypeError)

I've tried amending the tablix filter to extract the datetime part of the datetimeoffset value, by editing the expression to use

Fields!MyDateTime.Value.DateTime

but unfortunately I then get the error:

Failed to evaluate the FilterExpression of the Tablix ‘Tablix1’. (rsFilterEvaluationError)

Am I right in thinking that support for the datetimeoffset data type in Report Builder 3.0 is patchy? The report works if I cast the datetimeoffset column to a datetime in the embedded SQL, but this rather negates the point of using datetimeoffset data types.

Hope someone can help!

Thanks

Edward
Post #1608345
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse