Day/Month does not work properly when entered into a date parameter

  • I have a problem in converting my reports to SSRS2008 from RS2000. (All discussions below are in UK format).

    Most of the reports that I developed in RS2000 have [FromDate] and [ToDate] parameters for the user to enter his date range. Simply entering 1/2 and 1/3 in those 2 fields will return data for February 2010 (it becomes "01/02/2010 00:00:00" to "01/03/2010 00:00:00" when you press "View Report". This is exactly what is needed.

    When I do the same thing in SSRS2008, "1/2" becomes "01/02/2010 00:00:00 +01:00" and in VS2008 (from BI) an error (#Err) shows in any field that wants to manipulate it - [rsRuntimeErrorInExpression] The Value expression for the textrun ‘textbox6.Paragraphs[0].TextRuns[0]’ contains an error: Unable to cast object of type 'System.DateTimeOffset' to type 'System.IConvertible'.

    If I choose the date from the date picker, there is no problem, but I don't understand why we cannot continue using the defaulted year of SSRS2000 (current year) without errors. It almost works, but sticks some offset on the end which screws up any calculations/formats in the report.

    I can understand some people like the date picker, but in our case it is so much easier to type in 1/2 TAB 1/3 ENTER.

    IN SSRS2008 the same request is 1/2/10 TAB TAB 1/3/10 TAB TAB ENTER.

    Does anyone know of any environmental or such options that allow the old syntax (or removes that offset, or disables the date picker), or will we have to train our users to type the full date string and do a lot more tabbing.

    Thanks in advance for any help on this.

  • not sure if this will help or not...

    I'm guessing you're using VB in the reports to do this and so

    Just the DateTime part of a DateTimeOffset value

    =Fields!MyDatetimeOffset.Value.DateTime

    http://technet.microsoft.com/en-us/library/dd255246.aspx

    If you've just got an embedded query in the report you could use string manipulation to trip off the offset value.



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply