joslat


Hi,

I am having the "classical problem" of the forums; A local date changed to the american format (normally in the development environment) which I call "Switching months with days"... well it switches both again if you press "view report" again :)


The problem I'm having is that when I Navigate from one report to other, the dates get switched...
Everything's been set in the locale uk date format (dd/mm/aaaa), in the operating system, in the database and in the reports... and the reports are working properly through the web interface.. the only thing that is not working properly is the Navigation which switches the date month with the day...

Changing all the Reporting Services server, database server to the american format date is not an acceptable solution.

Thanks for any guidance on this, as I'm pretty lost...
Jose




Re: Problem with dates format passed as parameters...

raja760


where are you switching the dates.

may be create and set a workflag and set it to 0 or 1

based if its 1 dont do anything if its 0 switch the dates to american format. so even if the user clicks the view report again, it will check for 1 and does nothing.

Thanks

Kishore.






Re: Problem with dates format passed as parameters...

joslat

Hi Raja,

Thanks for your help, I'll try to explain what you ask:
I have a report with two parameters :
  • BeginningDate
  • EndingDate

Then the data is selected through these parameters...

Then I have on the detail row a Navigation Link to other report with these Dates as the passthrough parameters.

When I click the link, the "switch" is done. if I have 01/12/2006, it becomes 12/01/2006 on the report I navigate to...

Basically the "switching" is made when it passes the value of the parameters to the report we navigate to.

The reports alone work perfectly, without changing the dates. So I could not set up a system like the one you say. What I need is that it doesn't change the date format... If anyone could get me lights on this that would be great as I have already dedicated too much time into solving issues with reporting services...

Thanks for your time,
Jose Luis






Re: Problem with dates format passed as parameters...

Andrew - T4G

Try using string instead of datetime parameter, formatted as yyyyMMdd.

This is something like Convert(varchar(8),mydate,112)

Here is a good link with examples in SQL.
http://databases.aspfaq.com/database/what-are-the-valid-styles-for-converting-datetime-to-string.html

In Reporting Services you would use the Format function. eg. Format(MyDate, "yyyyMMdd")

cheers,
Andrew





Re: Problem with dates format passed as parameters...

joslat

Hi!

That would work if the report wasn't called directly from the user, then, with that approach we are unable to present him the data selector, so he will have to write down the date this way... that is not acceptable by my client...

If the report was accessible only through the Navigation Link your approach would work wonderfully...

The point is how to make dates work right in other languages in SQL Server 2005 Reporting Services.... we are at the 2nd Service pack and it still doesn't work properly.. sigh...

Have to say that I have tried everything here, changing the user that executes the reporting services service, the database language, the system locale, the web.config locale, the report, table and all is set to spain (spain) and still it twists the date when we pass it as a paremeter

"13/02/2006" to "02/13/2006" , giving the properly errors, though...

Well, any help on this
Thanks!!!
Jose