reportContext.setGlobalVariable() works?

smgomes
edited February 11, 2022 in Analytics #1
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.
Warning No formatter is installed for the format ipb

Comments

  • mwilliams
    edited December 31, 1969 #2
    What is your BIRT version? Can you recreate your issue with the sample database?
    Warning No formatter is installed for the format ipb
  • smgomes
    edited December 31, 1969 #3
    <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.
    Warning No formatter is installed for the format ipb
  • mwilliams
    edited December 31, 1969 #4
    Can you recreate your issue with the sample database? Thanks!
    Warning No formatter is installed for the format ipb
  • smgomes
    edited December 31, 1969 #5
    Sorry mwilliams I haven't seen your question. My problem is solved now :) Thanks.
    Warning No formatter is installed for the format ipb
  • mwilliams
    edited December 31, 1969 #6
    Good to hear!
    Warning No formatter is installed for the format ipb