title: When I pass in nothing as a parameter I am getting an error in my expression
body: <pre><code>=String.Format("{0:C}", IIf(IsNothing(Parameters!Pricing.Value), 0, IIf(IsNothing(Parameters!CPPrice.Value), IIf(Parameters!ControlPanel.Value.ToString().Contains("D"), CInt(Parameters!Pricing.Value * 2), CInt(Parameters!Pricing.Value)), CInt(Parameters!Pricing.Value))) 
  + IIf(IsNothing(Parameters!RMPrice.Value), 0, CInt(Parameters!RMPrice.Value)) 
  + IIf(IsNothing(Parameters!CPPrice.Value), 0, CInt(Parameters!CPPrice.Value))
  + IIf(IsNothing(Parameters!CKPrice.Value), 0, CInt(Parameters!CKPrice.Value)) 
  + IIf(IsNothing(Parameters!FPrice.Value), 0, CInt(Parameters!FPrice.Value)) 
  + IIf(IsNothing(Parameters!GRPrice.Value), 0, IIf(IsNothing(Parameters!CPPrice.Value), CInt(Parameters!GRPrice.Value), IIf(Parameters!ControlPanel.Value.ToString().Contains("D"), CInt(Parameters!GRPrice.Value * 2), CInt(Parameters!GRPrice.Value)))))
  </code></pre>
  
  <p>This is an expression I am trying to use in my report.  It is looking at several prices being passed in and totaling those prices.</p>
  
  <p>If a control panel <code>Parameters!ControlPanel.Value</code> contains a D, then double the price of <code>Parameters!Pricing.Value</code> and <code>Parameters!GRPrice.Value</code> if is nothing.</p>
  
  <p>Everything seems to work fine when there is a price / value passed in for <code>Parameters!ControlPanel.Value</code> and <code>Parameters!CPPrice.Value</code>, but if nothing is passed in, I get an #Error result.</p>
  
  <p>Update: This is also giving me an error:</p>
  
  <pre><code>=String.Format("{0:C}", IIf(IsNothing(Parameters!Pricing.Value), 0, IIf(IsNothing(Parameters!ControlPanel.Value), CInt(Parameters!Pricing.Value), IIf(Parameters!ControlPanel.Value.ToString().Contains("D"), CInt(Parameters!Pricing.Value * 2), CInt(Parameters!Pricing.Value))))
  + IIf(IsNothing(Parameters!RMPrice.Value), 0, CInt(Parameters!RMPrice.Value)) 
  + IIf(IsNothing(Parameters!CPPrice.Value), 0, CInt(Parameters!CPPrice.Value))
  + IIf(IsNothing(Parameters!CKPrice.Value), 0, CInt(Parameters!CKPrice.Value)) 
  + IIf(IsNothing(Parameters!FPrice.Value), 0, CInt(Parameters!FPrice.Value)) 
  + IIf(IsNothing(Parameters!GRPrice.Value), 0, IIf(IsNothing(Parameters!ControlPanel.Value), CInt(Parameters!GRPrice.Value), IIf(Parameters!ControlPanel.Value.ToString().Contains("D"), CInt(Parameters!GRPrice.Value * 2), CInt(Parameters!GRPrice.Value)))))
  </code></pre>