- You create a Windows Forms application or a Windows Presentation Foundation (WPF) application that is based on the Microsoft .NET Framework 4.0.
- In the Windows Forms or WPF application, you use a Microsoft Report Viewer 2010 control to display a Microsoft SQL Server 2012 Reporting Services (SSRS 2012) report that runs in remote mode.
- The report includes a DateTime type parameter that has a default value.
- You run the application on an operating system that has the regional settings set to Italian. Additionally, the Long Time format is set to "HH:mm:ss".
- The default value of the DateTime type parameter is not displayed in the parameter prompt area.
- If you assign a value to the DateTime type parameter and update the report, the value is lost after the report is rendered and is not displayed.
When a SSRS 2012 server runs a report by using the "." symbol as a time separator, the DateTime type parameter is sent back to the client as a string. The Report Viewer control calls the DateTimeOffset.TryParse method to validate the string by using the ":" symbol as the time separator. Therefore, the string is validated as false and it is not displayed in the parameter prompt area.
Note This issue only occurs if the Long Time format is set to "HH:mm:ss", the default setting for Italian regional settings. The default setting for Italian regional settings depends on your operating system. Additionally, you can configure the default setting of your operating system by changing the Long Time format.
Cumulative update information
Cumulative update 2 for SQL Server 2012 Service Pack 1 (SP1)The fix for this issue was first released in Cumulative Update 2. For more information about how to obtain this cumulative update package for SQL Server 2012 Service Pack 1, click the following article number to view the article in the Microsoft Knowledge Base:
- Set the regional settings on the application and the operating system to match the regional settings that are located on the client.
- Create a string input field for the user to populate with text. Then in the report, convert the string to a date.
- Create a hidden or no-prompt parameter that is populated from the string input field when you run the report.
- Create a non-visible DateTime type parameter and a DateTimePicker control outside the Report Viewer control. Click View Report, and then put the string value into the DateTime type parameter in the SubmittingParameterValues event handler.
DateTimeOffset.TryParseExact method and DateTimeOffset.TryParse Method, visit the following MSDN websites:
DateTimeOffset.TryParse Method (String, DateTimeOffset%)
Artikelnummer: 2715841 – Letzte Überarbeitung: 24.01.2013 – Revision: 1