I'm trying to debug an error in an SSRS report created by another developer. As far as I can tell, it's a division by zero problem. All the report is doing here is calculating a percentage at the end. The stored procedure converts all null values to zero before returning results, so I can't see what the problem is here. Any ideas?
=
Sum(IIf(Fields!ConstructionTradeDesc.Value = "Journeyman",
Fields!BlackF.Value + Fields!HispanicF.Value + Fields!AsianPacificF.Value + Fields!NativeAmericanF.Value + Fields!OtherF.Value,
Nothing))
/
Sum(IIf(Fields!ConstructionTradeDesc.Value = "Journeyman"
and
Fields!BlackM.Value + Fields!BlackF.Value + Fields!HispanicM.Value + Fields!HispanicF.Value + Fields!AsianPacificM.Value + Fields!AsianPacificF.Value +
Fields!NativeAmericanM.Value + Fields!NativeAmericanF.Value + Fields!OtherM.Value + Fields!OtherF.Value > 0,
Fields!BlackM.Value + Fields!BlackF.Value + Fields!HispanicM.Value + Fields!HispanicF.Value + Fields!AsianPacificM.Value + Fields!AsianPacificF.Value +
Fields!NativeAmericanM.Value + Fields!NativeAmericanF.Value + Fields!OtherM.Value + Fields!OtherF.Value,
1))
* 100