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)
Getting values from seperate run to render
BlazK
<p>Hi,</p><p> </p><p>I have seperate run and render,</p><p> </p><p>in run method dataSetAdapter triggers event afterOpen which executes</p><pre class="_prettyXprint"> reportContext.setParameterValue("dsPar", dsParams);</pre><p>dsParams is a JSONObject.</p><p> </p><p>Then in render ChartEventHandlerAdapter triggers beforeDrawSeries which has a parameter IChartScriptContext icsc </p><div><pre class="_prettyXprint">IReportContext ctx = (IReportContext) icsc.getExternalContext().getObject();JSONObject dsParams = (JSONObject) ctx.getParameterValue("dsPar");</pre><p>dsParams is null, so data does not get from run to render (if I use runAndRender it works correct).</p><p> </p><p> </p></div><p> </p>
Find more posts tagged with
Comments
micajblock
<div>Try using persistent global variables.</div><div> </div><div>in the afterOpen </div><div><pre class="_prettyXprint">reportContext.setPersistentGlobalVariable("dsPar", dsParams);</pre></div><div>[color=rgb(102,102,0);]and then in the onRender[/color]</div><div><pre class="_prettyXprint">var scriptable = icsc.getExternalContext().getScriptable();dsParams = scriptable.getPersistentGlobalVariable("dsPar");</pre></div>
BlazK
<p>Thanks I solved it the same way, I allready tried it before I posted here, but it vas something with the Object I was sending and got my problems mixed up.</p><p> </p><p>Could you just tell me what is the difference between</p><pre class="_prettyXprint">icsc.getExternalContext().getScriptable();icsc.getExternalContext().getObject();</pre><p>both return same type of object. I would look it up myself but deadlines are coming. So if you know something from the top of your head.</p><p> </p><p>I looked it up myself here <a data-ipb='nomediaparse' href='
http://birtworld.blogspot.com/2010/08/birt-charting-scripting-overview.html'>http://birtworld.blogspot.com/2010/08/birt-charting-scripting-overview.html</a> .Thanks
anyway.</p>