How to Display Blanks as Zeros in a SSRS Report

Home > Blogs > SQL Server > How to Display Blanks as Zeros in a SSRS Report

How to Display Blanks as Zeros in a SSRS Report

1 4 Peter Avila
Added by November 12, 2014

Some of the cells in this SSRS matrix report are blank:

001-How-to-Display-Blanks-as-Zeros-in-a-SSRS-Report

To display zeros instead, we will use two functions:

1.

2.

 

In the design of the matrix, right-click on the textbox containing the values in question, then select Expression… to edit the expression underlying the textbox.

002-How-to-Display-Blanks-as-Zeros-in-a-SSRS-Report

Type the following expression in the Expression dialog:

003-How-to-Display-Blanks-as-Zeros-in-a-SSRS-Report

The expression says that if SUM(Fields!SubTotal.Value) is Null (the IsNothing() function that it is in returns a True if it is Null and a Fales if it isn’t), then a zero is returned by the expression; otherwise the SUM(Fields!SubTotal.Value) is used.

Click OK and preview the report again. Notice that zeros are now present in what used to be the blank cells.

004-How-to-Display-Blanks-as-Zeros-in-a-SSRS-Report

Enjoy!

Peter Avila
SQL Server Instructor – Interface Technical Training
Phoenix, AZ

Videos You May Like

A Simple Introduction to Cisco CML2

0 3850 0

Mark Jacob, Cisco Instructor, presents an introduction to Cisco Modeling Labs 2.0 or CML2.0, an upgrade to Cisco’s VIRL Personal Edition. Mark demonstrates Terminal Emulator access to console, as well as console access from within the CML2.0 product. Hello, I’m Mark Jacob, a Cisco Instructor and Network Instructor at Interface Technical Training. I’ve been using … Continue reading A Simple Introduction to Cisco CML2

Difference Between $_ and $PSItem in Windows PowerShell

2 1905 4

In this video, I’m going to answer a very common question that I get when I’m teaching Windows PowerShell, and that’s, “What’s the difference between what’s called $_ and $PSItem?” Let me explain to you a little bit about what these two variables do. When we’re working with the PowerShell pipeline, and we want to … Continue reading Difference Between $_ and $PSItem in Windows PowerShell

How to Build in a PSMethod to your PowerShell Code

0 72 0

In this video, PowerShell instructor Jason Yoder shows how to add Methods (PSMethod) to your code using free software that’s added into the PSObject. For instructor-led PowerShell courses, see our course schedule. Microsoft Windows PowerShell Training Download the Building Methods PowerShell script</a> used in this video. <# ╔══════════════════════════════════════════════════════════════════════════════╗ ║ ║ ║ Building Methods ║ ╟──────────────────────────────────────────────────────────────────────────────╢ … Continue reading How to Build in a PSMethod to your PowerShell Code

Write a Comment

See what people are saying...

    Share your thoughts...

    Please fill out the comment form below to post a reply.