stevegray
4Penny.net
Points: 53075

2/4/2021 2:41:12 PM

SSRS Divide by Zero fix

* This article, and all our great SQL Server Reporting Services documentation, Is available on the SQL Server Reporting Services menu

SSRS does not handle the 'divide by zero' issue as gracefully as other environments. Assuming

a / b

you can say "iif(b=0,0,a/b)" and that'll do it. But SSRS returns an error for this, anyway. 

Solution below.

4Penny.net
Version: All
Section: SSRS
Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3