Learn your way! Get started

SSRS 2012, Part 04 of 10: Expressions and Functions

with expert Don Kiely

Watch trailer

Course at a glance

Included in these subscriptions:

  • Dev & IT Pro Video
  • Dev & IT Pro Power Pack

Release date 12/19/2013
Level Intermediate
Runtime 1h 18m
Closed captioning Included
Transcript Included
eBooks / courseware Included
Hands-on labs Included
Sample code Included
Exams Included

Enterprise Solutions

Need reporting, custom learning tracks, or SCORM? Learn More

Course description

In this course, you’ll learn the essentials of expressions, how to write and use them within reports. Then you’ll learn about the extensive set of built-in Reporting Services functions that you can use in your own expressions. In many cases, Microsoft has done the work of writing functions for common features, so why reinvent the wheel? Then we’ll wrap up the course by looking at how you can create your own custom functions, both one-offs for use in a single report as well as shared functions usable in multiple reports. This is a great way to extend Reporting Services so reports provide exactly the information your users need.


This course assumes that you have a basic familiarity with the concept of relational databases and a basic understanding of what SQL Server is and the high-level tools in it, as well as how to create and manage objects using Management Studio. You should also have a basic understanding of how SQL Server implements security, including its authentication and authorization schemes, and how to assign permissions on securable objects to principals. You should know the fundamentals of Transact-SQL to write queries to retrieve data and join data from multiple tables, and how to execute scripts using the query editor in Management Studio. It will be very helpful, but not absolutely necessary, to have experience with .NET development using Visual Studio 2010 or 2012 for the portions of the course that deal with SQL Server Data Tools. At the very least, we’ll assume that you are well familiar with the Visual Studio user interface. The focus of this course is the Reporting Services Native Mode installation to learn the fundamentals of creating and managing reports. Almost all of what you’ll learn will be applicable to a SharePoint integrated mode installation as well, but there are additional tools and considerations for SharePoint that aren’t covered thoroughly here. This course is written using Windows 7 and 8.1, and taped using Windows 7, using SQL Server 2012. For Windows, we assume you know how to start programs, etc. in whatever version of Windows you’re using. The Reporting Services features should be pretty much the same in SQL Server 2014, although some windows will probably look different; but the feature set is the same.

Learning Paths

This course is part of the following LearnNowOnline SuccessPaths™:
SQL Server Reporting Services

Meet the expert

Don Kiely is a featured instructor on many of our SQL Server and Visual Studio courses. He is a nationally recognized author, instructor, and consultant specializing in Microsoft technologies. Don has many years of teaching experience, is the author or co-author of several programming books, and has spoken at many industry conferences and user groups. In addition, Don is a consultant for a variety of companies that develop distributed applications for public and private organizations.

Course outline

Expressions and Functions

Writing and Using Expressions (15:29)
  • Introduction (00:52)
  • Writing and Using Expressions (01:43)
  • Using the Expression Editor (00:13)
  • Demo: Expressions (03:10)
  • Demo: Expression Editor (04:09)
  • Demo: Building an Expression (04:51)
  • Summary (00:28)
Report Operators and Functions (19:36)
  • Introduction (00:29)
  • Expression Operators (00:18)
  • Demo: Operators (03:59)
  • Built-in Functions (00:48)
  • Demo: Immediate If (03:44)
  • Demo: Switch Function (05:11)
  • Demo: Choose Function (00:28)
  • Using Other Built-In Functions (02:04)
  • Null Handling (02:06)
  • Summary (00:24)
The Global Collections (16:28)
  • Introduction (00:34)
  • The Global Collections (00:39)
  • The Fields Collection (01:02)
  • Globals Collection (02:40)
  • User Collection (01:13)
  • ReportItemsCollection (01:08)
  • Variables Collection (01:04)
  • Demo: Global Fields (04:20)
  • Demo: Times (03:20)
  • Summary (00:24)
Creating Custom Functions (07:17)
  • Introduction (00:42)
  • Creating Custom Functions (01:06)
  • Demo: Custom Functions (04:57)
  • Summary (00:31)
Sharing Custom Code (19:34)
  • Introduction (00:35)
  • Sharing Custom Code (02:07)
  • Creating a Custom Assembly (03:20)
  • Demo: Custom Assemblies (04:29)
  • Demo: Report (03:33)
  • Demo: References (04:51)
  • Summary (00:35)