title: Crystal Reports Formula Evaluation - Once per section?
body: <p>I've written a formula as follows</p>
  
  <pre><code>whileprintingrecords;
  
  shared numbervar level1;
  
  level1:=level1+1;
  
  ToText(level1,0);
  </code></pre>
  
  <p>And placed it into a report as so:</p>
  
  <pre><code>Report Header a |   {formula} {Text:Introduction}
   Report Header b |   {formula} {Text: Scope} 
   Report Header c |   {formula} {Text: Overview} 
   Group Header a |   {formula} {Group Header text}
  </code></pre>
  
  <p>The print result is</p>
  
  <pre><code>1 Introduction
  1 Scope
  1 Overview
  2 Group Header text
  </code></pre>
  
  <p>I would expect to see</p>
  
  <pre><code>1 Introduction 
  2 Scope 
  3 Overview 
  4 Group Header text
  </code></pre>
  
  <p>It seems the formula is being evaluated once for the entire Report Header sections and the single result is being printed everyone the formula is placed.  Is there any way to force evaluation of the formula each time it appears in the report, and not rely on some cached value?</p>
  
  <p>Of course, alternative implementation suggestions welcomed too.</p>
  
  <p>Thanks in advance,</p>
  
  <p>Shamrock</p>