Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Date parameter - with a twist!

Author  Topic 

jacovdw
Starting Member

1 Post

Posted - 2007-05-21 : 11:32:38
I'm currently struggling with the following scenario:

I've created an ASP.net (VB.Net) SQL RS viewer page using the SOAP API (similar to http://www.codeproject.com/sqlrs/SQLRSViewer.asp).

In short: a single ASP page continuously calls the ReportingService.GetReportParameters() function which returns the report's associated parameters (and even their valid values if ForRender is set to True), which is then in turn used to construct the relevant dropdowns, calender controls, radio buttons, etc. etc. in order for the user to select values from. After each selection the page would perform a post-back to requery RS with the newly supplied values (once again calling ReportingService.GetReportParameters()), thus incrementally gathering all the required report parameters untill it can finally allow the user to call ReportingService.Render(), which would return the actual generated report.

Now - my problem is as follows:

My reports use UK date formats - i.e. dd/MM/YYYY

I'm developing this app on a development machine with Win XP SP 2, SQL Server 2000 (sp2), SQL Reporting Services 2000 (sp1), and MS Visual Studio 2003. My PC's locale is set to UK, as well as Internet Explorer's.

All my reports are configured for UK dates (i.e. in rdl files I've got the <Language>en-GB</Language> element).

If I make use of Reporting Service's Report Manager, all my reports accept UK-format dates without any complaints.

However - the moment I make use of the SOAP API any calls to ReportingService.GetReportParameters() or Render() fail if the dates are not in US format (MM/dd/yyyy). Even default date-values that my reports might have are returned in US format.

Where are things going wrong? My ASP.Net app is configured for UK dates (i.e. in Web.config I've got culture="en-GB" and uiCulture="en-GB"), and if I place a breakpoint just before a call to ReportingService.GetReportParameters() the current Thread's culture is en-GB...

Any help will be much appreciated!



   

- Advertisement -