title: SSRS 2 decimal places using cast,format, etc but sum comes out incorrect
body: <p>Using SSRS to generate a report from SQL, saving it to Excel to then save to CSV (due to formatting)</p>
  <p>I have net values of up to varying decimal places.
  Column A is net * X, and a separate Column B that indicates the net is a negative or a positive value</p>
  <p>Field C is sum of (net * X) ie:</p>
  <pre><code>    =Sum (
  // based on Column B, its a positve or a negative value
      IIf(Fields!TranType.Value=&quot;X&quot;, Fields!Net.Value * -1, Fields!Net.Value) 
      ) * Parameters!UnitPrice.Value
  </code></pre>
  <p>My problem here is I have tried round(net,2), Format(net, ###.##), Cast(net,AS DECIMAL(10,2)). In theory the Sum of Column A (with data from Column B) should equal the result in Field C but I am always off by 0.01 to 0.04.</p>
  <p>Can anyone recommend how to better manage the decimal places so sum of column A = Field C?</p>
  <p>Please note I download the list to Excel, in Excel it looks right when I do comparison but when I save to CSV and upload in another program which checks the data it complains of the 0.01 incorrect. For all intents and purposes, Excel shows the data correct, CSV appears correct too.</p>