Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Select problems

Status
Not open for further replies.

dhulbert

Technical User
Jun 26, 2003
1,136
GB

I have a numebr of reports which use reporting serivces date parameters and give the user the nice calender control to select them. The Reports work fine when they are published to the report server and they work OK on one of the development boxes, but when previewing the report in visual studio if you pick a date such as 29th February 2008 (29/02/2008 English Locality) the system throws an error about invalid dates.
It must be a setting somewhere but does anyone know what and where, it's driving me mad now......



I love deadlines. I like the whooshing sound they make as they fly by
Douglas Adams
(1952-2001)
 
Sounds to me like different locality settings on the server and the desktop machine as well. But this should not really matter.

Are you doing any formatting of the date? This is where the culture settings could come into play.

Hope this helps,

Alex



[small]----signature below----[/small]
I'm pushing an elephant up the stairs

My Crummy Web Page
 

Locality settings on both machines are UK English.

No formatting of dates involved.

I love deadlines. I like the whooshing sound they make as they fly by
Douglas Adams
(1952-2001)
 
I have gone right back to creating a new report with no dataset just a blank report with 1 parameter called start with datatype datetime.

On the original machine if you select 29/02/2008 no problem on the new machine error message

"The value provided for the report parameter 'start' is not valid for its type."

If you select any date that can be reversed into US format ie 01/12/2008 its fine pick one that can't 29/02/2008 then it falls over.

I love deadlines. I like the whooshing sound they make as they fly by
Douglas Adams
(1952-2001)
 
Bet when you pick a format that can be converted to US format, you get the wrong date

ie enter 01/02/08 for 1st feb 08, you get returned 01/02/08 but as 2nd Jan 08

Definitely a date setting somewhere. Check local install of RS, Vis Studio, local SQL Server (if you have one) and ODBC settings on the machines (ODBC settings can have specific locality settings and can vary from machine to machine)

Actually, my bet is on ODBC setup....

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
It may help to format dates on the client side to ISO format.

Something like MyDateTime.ToString("yyyyMMdd") I believe.

This format will ALWAYS be read correctly by SQL Server.

Hope this helps,

Alex

[small]----signature below----[/small]
I'm pushing an elephant up the stairs

My Crummy Web Page
 
Geoff

Spot on, the dates to get swapped around and that is where the erroe is coming from obviously 29/02/2008 is 29th February but it tries to swap to 2nd of the 29th month and gets very confused.

I can't find the ODBC settings on this machine for some reason but as the report doesn't have any link to a data source in it at the point i've stripped it back to I'm not sure if that would eb the problem.

Any other ideas where dates might be stored, Windows Locality dates etc are the same, Vis Studio is set to English on all machines.

No Local SQL2005 on the problem machine dies have SQLEXPRESS installed

I love deadlines. I like the whooshing sound they make as they fly by
Douglas Adams
(1952-2001)
 
Yes - a lack of data source would tend to rule out an ODBC issue !!

Must be on the client side install of RS. There is a client side rendering engine that must have some date settings somewhere as that is what is used to preview reports before they are deployed.....would've tbought that Vis Studio would handle it but may be a setting in the rendering engine itself. Unfortunately, I can;t tell you what the file is called as I didn't do the install here...:-(

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top