Switch runtime error in expression Attempt to divide by 0?
Any ideas on how to get this to work would be greatly appreciated... The following expression works when the SampleWgt > 0 however when <= 0 I get the following message: [rsRuntimeErrorInExpression] The Value expression for the textrun ‘VineRate.Paragraphs.TextRuns’ contains an error: Attempted to divide by zero. In this case the SampleWgt value = 0 so I am expecting just the first condition to execute. The FMVineCnt = 48 and GrossSampleWgt = 16025 so the result should be .29 =Switch(fields!SampleWgt.Value <= 0, fields!FMVineCnt.Value / fields!GrossSampleWgt.Value) * 100, fields!SampleWgt.Value > 0, fields!FMVineCnt.Value / fields!SampleWgt.Value) * 100) Thanks, Mike