SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Problem with Filtering on Tablix control using datetimeoffset data type


Problem with Filtering on Tablix control using datetimeoffset data type

Author
Message
edwardwill
edwardwill
SSC Eights!
SSC Eights! (822 reputation)SSC Eights! (822 reputation)SSC Eights! (822 reputation)SSC Eights! (822 reputation)SSC Eights! (822 reputation)SSC Eights! (822 reputation)SSC Eights! (822 reputation)SSC Eights! (822 reputation)

Group: General Forum Members
Points: 822 Visits: 339
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search