Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Error in drill-through link for previous year
AnnaB
Hi all,
I have a working report with several parameters, one of them "reportYear". I would like to add a hyperlink in my report generating a new report for the previous year, with all other parameters the same.
I tried doing this via the "Edit hyperlink" wizard, by giving "reportYear" the value "reportYear.value - 1".
However, instead of returning "2012" if the current reportYear is 2013, the returned hyperlink contains "&reportYear=2012.0" and the viewer throws an error. This happens even if I use parseInt or Math.floor.
Why is BIRT turning my pretty integers-even-though-JS-doesn't-have-integers-but-let's-pretend into floats, and what can I do about it?
Find more posts tagged with
Comments
bricombs
Good Day
This works for me in 3.7.2. I have attached small sample. When you click on the year it will create new report for the previous year.
AnnaB
Thank you! Unfortunately, it doesn't work for me.
It gives the same result: parameterYear=2012.0 and the error org.eclipse.birt.report.service.api.ReportServiceException: Required parameter parameterYear is blank. (Element ID:651)
Does BIRT have a global setting for formatting numbers? I'm running out of ideas... the column binding I used to compute "previous year" shows as 2013, without the .0 .
AnnaB
We use 4.2.0, by the way.
bricombs
Good Day
Please check and make sure the Report Parameter data type is set to integer. In may sample I forgot to set it back to interger and left it as string. I found that when the Report Parameter is set to string I see the .0 at the end of the year. But when I set it to integer it does not have the .0. You may also want to check and make sure everything is set to integer.