Hi All,
I have a report with two parameters. Date1 and date2 and both are of type
datetime. when I select a date greater than 12/05/2006 the report fails
stating "the value provided for the report parameter Date2 is not valid for
its type". Now date1 has 01/05/2006 and date2 has 31/05/2006. For the
format is Australian date format and I have checked my regional settings and
they are set correctly to Australian and I have done the same on the report
server.
What is going on and how do I fix it....
Thanks
MichaelHi Michael,
Thank you for using MSDN Managed Newsgroup Support.
From you description, my understanding of this issue is: You want to
transfer the date-time parameter in (dd/mm/yyyy) format in to the report.
If I misunderstood your concern, please feel free to point it out.
By default, it's not possible to set the format of the date. However I did
a workaround for you, you can set the parameter data type to string then
use the SQL Convert() function to convert the parameter to DateTime.
The simple example of this will be like this.
Select * from orders where orderDate= CONVERT(DateTime, @.mydate, 103)
Here is the article about the CONVERT function.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_
ca-co_2f3o.asp
Hope this will be helpful.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi Michael/Wei
I have found the exact same problem, here's what we have discovered.
The problem is that RS swaps the month and day.
A start and end date is chosen in the datepicher controls. This is ok, but
when "view report" is activated, RS swicthes day and month and thus it is
considered a invalid date.
A clear example is when you e.g. choose 2006-01-05 in a datepicker control.
When view reports is activated, then the date has changed to 2006-05-01.
As an extra info, the problem is userspecific, we have tried to use
different users from the same computer and the result was ok with obe user
and not ok with another. The dateformat setup was 100 % simular on these
users.
The convert function is not the answer to this problem, instead I find it to
be a really annoying bug that makes the datepicker useless.
As Michael, I really would like the solution to this problem.
Forgive my english :-)
Martin
"Wei Lu" wrote:
> Hi Michael,
> Thank you for using MSDN Managed Newsgroup Support.
> From you description, my understanding of this issue is: You want to
> transfer the date-time parameter in (dd/mm/yyyy) format in to the report.
> If I misunderstood your concern, please feel free to point it out.
> By default, it's not possible to set the format of the date. However I did
> a workaround for you, you can set the parameter data type to string then
> use the SQL Convert() function to convert the parameter to DateTime.
> The simple example of this will be like this.
> Select * from orders where orderDate= CONVERT(DateTime, @.mydate, 103)
>
> Here is the article about the CONVERT function.
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_
> ca-co_2f3o.asp
> Hope this will be helpful.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>|||Hi Martin,
Thank you for your post.
Unfortunately, I could not reproduct this issue on my side. When I click
the datetime picker, it could render the date correctly.
Would you please provide some additional information about the Regional
Settings?
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi Wei
My settings are as follows:
International settings/Standards and formats = "Danish"
Short dateformat = "DD-MM-YYYY"
Dateseperator = "-"
If you have an email I would be happy to send some screensdumps.
Sincerely,
Martin
"Wei Lu" wrote:
> Hi Martin,
> Thank you for your post.
> Unfortunately, I could not reproduct this issue on my side. When I click
> the datetime picker, it could render the date correctly.
> Would you please provide some additional information about the Regional
> Settings?
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>|||Hi Martin,
My direct email address is weilu@.ONLINE.microsoft.com (Please remove the
ONLINE before you send the email).
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi Wei Lu -
I notice that you respond to certain posts "welcome to MSDN managed
newsgroup support" - how can I get this same assistance? I am an MSDN
subscriber - is there some special way to post a question to get your
attention? I am wondering how I can set a default date of TODAY in RS2005
when I have a date parameter set as datetime. I want to provide a default
value of current date. Cant seem to get it working without getting a type
incorrect when I use a function like TODAY or NOW. Thanks in advance!
"Wei Lu" wrote:
> Hi Martin,
> My direct email address is weilu@.ONLINE.microsoft.com (Please remove the
> ONLINE before you send the email).
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>
No comments:
Post a Comment