How to Display Blanks as Zeros in a SSRS Report
How to Display Blanks as Zeros in a SSRS Report
Some of the cells in this SSRS matrix report are blank:
To display zeros instead, we will use two functions:
1.
1 | IsNothing(<Val2Check>) returns a True of Val2Check is Null; otherwise, it returns False |
2.
1 | IIF(<Test>, <IfTrue>, <IfFalse>) return <IfTrue> if <Test> is True; otherwise, it returns <IfFalse> |
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.
Type the following expression in the Expression dialog:
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.
Enjoy!
Peter Avila
SQL Server Instructor – Interface Technical Training
Phoenix, AZ
You May Also Like
How to Build in a PSMethod to your PowerShell Code
0 55 0In 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
Creating Users and Managing Passwords in Microsoft Office 365
0 717 3In this Office 365 training video, instructor Spike Xavier demonstrates how to create users and manage passwords in Office 365. For instructor-led Office 365 training classes, see our course schedulle: Spike Xavier SharePoint Instructor – Interface Technical Training Phoenix, AZ 20347: Enabling and Managing Office 365
JavaScript for C# Developers – September 24, 2014
0 495 3Is JavaScript worth taking the time to learn if I’m a server-side .NET developer? How much of C# carries over to JavaScript? In this recorded video from Dan Wahlin’s webinar on September 24,2014, Dan answers these questions and more while also discussing similarities between the languages, key differences, and the future of JavaScript (ES6). If … Continue reading JavaScript for C# Developers – September 24, 2014
See what people are saying...