Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Date Report Parameter Issues
zax
Hello,<br />
<br />
I have a report with two date parameters set up in "Report Parameters". Their data type is set to "Date" and I have formatted the dates to b yyyy-MM-dd. When I run a preview of the report, I enter the following dates:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>2010-07-01
2010-07-31</pre>
<br />
But I also am trying to display these input parameters on the report. So I am using:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>"<b>Report Start: </b>" + params["StartDate"].value + "<br /><b>Report End: </b>" + params["EndDate"].value</pre>
<br />
But in the report the dates have been changed to:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>1970-07-01
1970-07-31</pre>
<br />
And I get the feeling these are the dates being passed to the stored procedure as it is returning no rows. If I do the call using the '2010' dates as hard coded parameters, everything works fine. Is this a bug? I cannot think of a good reason why the parameters are getting changed on the fly.<br />
<br />
Anybody?<br />
<br />
Thanks,<br />
Stephen
Find more posts tagged with
Comments
mwilliams
Hi Stephen,
Do you do any scripting on the dates anywhere in your report? If so, can you attach your report design and let me know what your BIRT version is. Thanks!
zax
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="67169" data-time="1281366571" data-date="09 August 2010 - 08:09 AM"><p>
Hi Stephen,<br />
<br />
Do you do any scripting on the dates anywhere in your report? If so, can you attach your report design and let me know what your BIRT version is. Thanks!<br /></p></blockquote>
<br />
No, I don't think I do any scripting on the dates. I am using version 2.6.0. I have attached the report design.<br />
<br />
Thanks, Stephen
zax
I am not sure what was going on there, but I deleted the report parameters, added them again and then replaced the data table with a new one, and now the dates do not get changed. To anyone reading this, they might think I had done some weird scripting on the dates before, but I am 100% I had not.
Well, Thanks for you offer of help.
Stephen
mwilliams
Stephen,
That is odd. Glad it is working now, though. Let us know whenever you have questions!
CalilJorge
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="67220" data-time="1281456827" data-date="10 August 2010 - 09:13 AM"><p>
Stephen,<br />
<br />
That is odd. Glad it is working now, though. Let us know whenever you have questions!
<br /></p></blockquote>
<br />
Really Odd! I had a problem once, that using `var where = " WHERE " + params["where"]` didn't work, but `var where = " WHERE 1=1 "` worked properly!<br />
<br />
Well, once I solved a problem with data parameters transforming everything into strings. I know it's not the best way, but it was a solution! =]