title: Why should I use BIRT setGlobalVariable() method?
body: <p>I've some reports where I use JavaScript variables between different event handlers. </p>
  
  <p>Example:</p>
  
  <pre><code>//Data Set beforeOpen:
  fooList = "";
  
  //Data Set fetch:
  fooList += row['foos'] + ", ";
  
  //Dynamic Text expression, somewhere in the report:
  fooList
  </code></pre>
  
  <p>This code works for me in 2.6.2. (There is an invisible table above this DynamicText which triggers Data Set use)</p>
  
  <p>Documentation says, that I should use <code>reportContext.setGlobalVariable("foo","bar");</code>, but I haven't yet found, that using simple assignments is discouraged. </p>
  
  <p>What are disadvantages of using simple assignments in BIRT Javascript event handlers, such as <code>foo="bar";</code> and reading it later in another event handler?</p>