Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Global js function used by dataset parameter seems not working
Migrateduser
<p>Hi experts,</p>
<p>I've created some birt reports, but I'm far away from expert status. Hope anyone here can help me to solve this "basic task"...</p>
<p> </p>
<p>I want to use a global js function or global js variable to set a dataset parameter. Therefore I've created an external js file and linked it with my report. Alternatively, I added this function in the initialize event of report and don't use the external file</p>
<pre class="_prettyXprint">
// Example external js function
function myString( str )
{
return str + 'globaltest';
}
</pre>
<p>When using myString ( 'test' ) as a default value expression for dataset parameter I got always following error message: "myString" is not defined.</p>
<p> </p>
<p>I've checked it with an report parameter instead of the default expression but the behavior is similar.</p>
<p>In addition I added reportContext.setPersistentGlobalVariable( "myString", myString) and would like to get the information by reportContext.GetPersistentGlobalVariable( "myString") but report parameters and dataset parameters seems no reportContext or can't use global js functions/variables.</p>
<p> </p>
<p>I've no more idea but I'm sure some basic is missing :unsure: I'm on birt 2.5.1</p>
<p>Thanks in advance</p>
Find more posts tagged with
Comments
There are no comments yet