Divide by zero error in SSRS Report
问题 I am writing a report in SQL Server 2005 Reporting Services, involving the division of money values that might be equal to zero. I put the following code in to check for a zero denominator: =IIf(Sum(Fields!PreviousPremiumMTD.Value) = 0, "N/A", FormatPercent((Sum(Fields!PremiumMTD.Value) / Sum(Fields!PreviousPremiumMTD.Value))-1, 0)) However, for some reason I am still getting #Error displaying on my report with the following warning thrown: [rsRuntimeErrorInExpression] The Value expression