Saturday, February 25, 2012

problem with dateTime picker

Hello.
I've just created a new report and I added a prameter of type
"DateTime".
I didn't even used it in the query.
Whan I preview the report I have the small calendar Icon.
after I pick a time from the picker and press "View Report"
I get the error:
"the value provided for the report parameter P1 is not valid for its
type"
I'm using RS 2005.
Any body know whats the problem?
Thanks in advance,
Roy.On 15 Feb, 08:30, "nicknack" <roezo...@.gmail.com> wrote:
> Hello.
> I've just created a new report and I added a prameter of type
> "DateTime".
> I didn't even used it in the query.
> Whan I preview the report I have the small calendar Icon.
> after I pick a time from the picker and press "View Report"
> I get the error:
> "the value provided for the report parameter P1 is not valid for its
> type"
> I'm using RS 2005.
> Any body know whats the problem?
> Thanks in advance,
> Roy.
Hi Roy I had this too and it was the date format that the picker was
sending to the dataset query.
I got around it by formatting the datepicker value to be the same as
the sql table date format ie
I hope it works out for you.
SELECT loaddate ,*
FROM tbl_T
WHERE convert(varchar(12),tbl_T.loaddate,103) LIKE
convert(varchar(12), (@.LoadDate),103)|||Hi Caseywill,
Thanks, I also discover that I have a problem with the format.
Whan I choose 1/2/07 which should be the 1 in february I get in the
textbox 2/1/2007.
So when I choose 13/2/2007 which should be the 13 in february I get
2/13/2007 which give the error since it looks for the 13 month (I have
hebrew date settings).
I don't know how to fix it since the datepicker doesn't choose its
date from a query.
Any way, When I deploy it It seeems to be ok and only on local pc it
give me some problems.
Thanks for your replay.
caseywill67@.googlemail.com =D7=9B=D7=AA=D7=91:
> On 15 Feb, 08:30, "nicknack" <roezo...@.gmail.com> wrote:
> > Hello.
> > I've just created a new report and I added a prameter of type
> > "DateTime".
> > I didn't even used it in the query.
> > Whan I preview the report I have the small calendar Icon.
> > after I pick a time from the picker and press "View Report"
> > I get the error:
> > "the value provided for the report parameter P1 is not valid for its
> > type"
> >
> > I'm using RS 2005.
> >
> > Any body know whats the problem?
> >
> > Thanks in advance,
> > Roy.
> Hi Roy I had this too and it was the date format that the picker was
> sending to the dataset query.
> I got around it by formatting the datepicker value to be the same as
> the sql table date format ie
> I hope it works out for you.
> SELECT loaddate ,*
> FROM tbl_T
> WHERE convert(varchar(12),tbl_T.loaddate,103) LIKE
> convert(varchar(12), (@.LoadDate),103)

No comments:

Post a Comment