Home
Analytics
reportContext.setGlobalVariable() works?
smgomes
Hi<br />
<br />
i'm having problems with setGlobalVariable function..<br />
<br />
I have a table with Group, in <strong class='bbc'>Header group</strong> i have a Data Component with the following Expression:<br />
<br />
reportContext.setGlobalVariable ("tmp", row["s1"] - row["s2"]);<br />
row["s1"] - row["s2"];<br />
<br />
In <strong class='bbc'>Details</strong> i have a Data Component with the following Expression:<br />
<br />
reportContext.getGlobalVariable ("tmp");<br />
<br />
When I render the report, the first line of Details is empty and the next lines shows the correct value of the global variable "tmp"<br />
<br />
What's the problem? Why the first line is empty? :S<br />
<br />
Thanks.
Find more posts tagged with
Comments
mwilliams
What is your BIRT version? Can you recreate your issue with the sample database?
smgomes
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="68498" data-time="1284659054" data-date="16 September 2010 - 10:44 AM"><p>
What is your BIRT version? Can you recreate your issue with the sample database?<br /></p></blockquote>
<br />
Hi mwilliams,<br />
<br />
my BIRT version = 2.6<br />
<br />
My report have two parameters: StartDate and FinalDate<br />
<br />
I have a Table component with Group..<br />
<br />
At Header Group i have one aggregation component to SUM all the values before the Start Date, the result of this aggregation i need to store on VAR, so i use reportContext.setGlobalVariable to store the result.<br />
<br />
In Details i have a DATA component to show the value of GLobal Variable, but i'm having problems, the first line appears blank, with no result and the next lines shows the correct result, my question is: why the first line appears blank? <br />
<br />
Thanks.
mwilliams
Can you recreate your issue with the sample database? Thanks!
smgomes
Sorry mwilliams I haven't seen your question. My problem is solved now
Thanks.
mwilliams
Good to hear!