title: Crystal Reports: Error on Sum in Formula Field
body: <p><strong>Intro:</strong>
  I have a very complex report. To make it a bit more easy, I build my report this way:
  In VS.net, I have a class. In the report I made a "Field Definitions Only"-file (ttx) which is exactly the same as the class. In code behind I set the class as the datasource of the (sub)report.</p>
  
  <p><strong>Problem:</strong>
  One class (and also the ttx-file) has the following fields: PriceTraditional, PriceCommercial. And there are 2 formulaFields which are SumPriceTraditional, SumPriceCommercial. </p>
  
  <p>When the class is empty, the datasource is also empty. This is when the error occurs. Probably because I take a sum of a field that is NULL. </p>
  
  <p><strong>Solutions I tried (but don't work):</strong></p>
  
  <ol>
  <li>I tried to change PriceTraditional with a formulaField (ex: PriceTraditionalDummy; with formula: <em>if isnull({DamageForReport.PriceTraditional}) then 0 else {DamageForReport.PriceTraditional}</em>. But then I get an error: <em>A number is required here. (Which is caused by the else part of the structure.</em> </li>
  <li>I tried turning on and off the default values replacing (no result)</li>
  </ol>
  
  <p><strong>Question:</strong> I just want to have a report where I can use that Sum-FormulaField without blowing up the report if the field used in the sum is empty. </p>
  
  <p>Any advice on how to solve this would be great!!</p>
  
  <p>Kind regards,</p>
  
  <p>Wim</p>