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)
Using Variables to replace Parameters
wirzbicki
Greetings all,<br />
<br />
I have a lack of understanding between variables and paramters used within a dataset.<br />
<br />
<strong class='bbc'>My Problem</strong><br />
<br />
I have a meter report where I had bind the dataset with parameters for the data needed to be passed to the sql command. All worked well except that those values needed (ie: fiscal yr, current date, fiscal week) could be figured out by BIRT functions.<br />
<br />
So create variables for eached and then proceeded to replace the parameters with variables in the dataset. All still was okay except that I couldn't see the parameter list from the dataset (I could live with that)but I know it indicates something is not quite right.<br />
<br />
I run the report and all looks good, it runs and the meter displays with proper values.<br />
<br />
But after closing the .rptdesign file and reopening it again I tried to edit the dataset and I get the errors:<br />
<br />
<strong class='bbc'>ERROR:</strong><br />
<br />
ReferenceError: "vars" is not defined.<br />
<br />
Reason: An unexpected internal exception occurred. Please see log for detail.<br />
<br />
<strong class='bbc'>Log file dump:</strong><br />
Plug-in Provider:Eclipse.org<br />
Plug-in Name:BIRT Designer UI<br />
Plug-in ID:org.eclipse.birt.report.designer.ui<br />
Version:2.5.1.v20090903<br />
Error Code:Error.GUIException.invokedByUnexpedtedException<br />
Error Message:ReferenceError: "vars" is not defined<br />
<br />
<br />
<br />
<strong class='bbc'>Thanks in advance for the help!<br />
Mike</strong>
Find more posts tagged with
Comments
mwilliams
Hi Mike,
When you run it, does it still work correctly? Even though it gives you an error when you try to edit it?
Where did you replace the parameters with the variables? In script?
johnw
Can you post the report design? Without seeing how you are calling the vars array, there is no telling what is wrong, or if there is a corruption in the report design.
If posting the report design isn't possible, I recommend opening your report, trying to preview the report to let it generate the error, then opening up the XML Source tab. Usually, the designer will put a red mark next to where the error is. You can click there, and hopefully recognize which expression you used and fix it.
John
wirzbicki
Greeting all,
First of all thank-you to the 2 experts who reponded back to me. I finally got the variables working within the report.
The problem (seems so long ago) was that I was using sum totals (with calculations within the element )from table to feed the graph. I moved the calculation (or duplicated) the calcualtions from the table to the Meter Value Definition. I wrote the java code for it there using both parameters and variables when needed.
Now I still get BIRT Exception errors when BIRT is trying to eveluate the express but that is understandable being that the variables don't exist unless the report is run (maybe future birt enhancement
)
If you want to see what I did I can post the report to the forum.
Thanks again!
Mike W
mwilliams
Sure! Post it in here! Or, you could show how you did what you did in a devShare post with the sample database for others to search.