Quantcast
Channel: SQLServerCentral » Reporting Services » Reporting Services » Latest topics
Viewing all articles
Browse latest Browse all 2791

Divide by Zero frustration

$
0
0
It doesn't seem to matter how I word this my Expression, I keep getting the following error: "rsRuntimeErrorInExpression The value expression for the textbox contains an error: Attempted to divide by zero.".I've tried this:[code]=IIF((Fields!NbrClaims.Value)> 0 and (Fields!NbrClaims.Value)< 0, Round((First(Fields!PaidClaims.Value)/First(Fields!NbrClaims.Value)),2), "0.00")[/code]And this:[code]=IIF((Fields!NbrClaims.Value)<> 0, Round((First(Fields!PaidClaims.Value)/First(Fields!NbrClaims.Value)),2), "0.00")[/code]and this:[code]=IIF((Fields!NbrClaims.Value)= 0, "0.00", Round((First(Fields!PaidClaims.Value)/First(Fields!NbrClaims.Value)),2))[/code]and I've even put a NULL test in there, even though the results of my original dataset always come back with zeros not nulls. And I still get the stupid "Divide by Zero" error. SSRS doesn't seem to be parsing the IIF right. And if I take the quotes off the 0.00, it still doesn't make a difference.Can anyone see what I'm missing? I'm getting really annoyed. The error only happens on the one line with zeros on it. The code works for every other group line.

Viewing all articles
Browse latest Browse all 2791

Trending Articles