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)
Variable problem
hugoscp1
<p>Hello, i want to used a value from a data field from one table (Element id: 2882), its the 3ª table from the top, and used in another table (Element id: 2397), 4º table from the top.</p>
<p> </p>
<p>I then create several variables, for example: total_soma_linha_6_nc_a</p>
<p> </p>
<p>Then i went to this aggregation field (total_soma_linha_6_nc) that is in the 3ª table, on the onCreate method and put: vars["total_soma_linha_6_nc_a"]=this.getValue(); (the value is -2245,09)</p>
<p> </p>
<p>Then i went to the this aggregation field (total_soma_linha_6_nc) in the 4º table and used it (row["total_linha6_nc"] (-6348,94) + vars["total_soma_linha_6_nc_a"] (-2245,09), but i get this ridiculous number -428425,86.</p>
<p>When it should -8594.03.</p>
<p> </p>
<p>I try to put a parseFloat but with no sucess.</p>
<p> </p>
<p>Help me</p>
<p> </p>
Find more posts tagged with
Comments
Clement Wong
<p>Instead of a Report Variable (intended for pagination variables -- see <a data-ipb='nomediaparse' href='
http://www.eclipse.org/birt/phoenix/project/notable2.5.php#jump_4'>BIRT
2.5 release notes</a>) using vars["name"], have you tried using a global variable instead?</p>
<p> </p>
<p>Example:</p>
<p>reportContext.setGlobalVariable("total_soma_linha_6_nc_a",this.getValue());<br>
reportContext.getGlobalVariable("total_soma_linha_6_nc_a");</p>
<p> </p>
<p>If this doesn't work, please send a design that we can run (using Classic Models) to replicate the issue.</p>