MSSQL Server Reporting Services : Black Belt Components: Manage Nulls in OLAP Reports

About the Series …

article is a member of the series MSSQL Server 2000 Reporting Services.
The series is designed to introduce MSSQL Server 2000 Reporting Services ("Reporting
Services"), with the objective of presenting an overview of its features,
together with many tips and techniques for real-world use. For more
information on the series, as well as the hardware / software requirements
to prepare for the exercises
we will undertake, please see my initial Database Journal article, A New
Paradigm for Enterprise Reporting

assumptions underlying the series are that you have correctly installed
Reporting Services, along with the applications upon which it relies, and that
you have access and the other rights / privileges required to complete the
steps we undertake in my articles. For details on the specifics of the
adjustments necessary to quickly allow full freedom to complete the exercises
in this and subsequent articles, as well as important assumptions regarding
rights and privileges in general, please see earlier articles in the series, as
well as the Reporting Services Books Online.

article also relies upon MSSQL Server Analysis Services ("MSAS") for
a sample cube that will be used as a data source by the report with which we
work in our practice exercise. For information surrounding the installation of
MSAS and the sample OLAP databases and cubes that accompany the typical
installation of MSAS, see the associated Books Online.

About the BlackBelt Articles …

One of
the greatest challenges in writing tutorial / procedural articles is creating
each article to be a freestanding document that is complete unto itself. This
is important, because it means that readers can complete the lesson without
reference to previous articles or access to objects created elsewhere. A
casual visitor to any article within a given series, who has presumably found
it via a search, should have no more difficulty completing the article (and
meeting immediate needs) than a visitor who is completing the articles in
sequence, to learn the concepts presented in an ongoing manner. To meet the
needs of both types of readers, while keeping articles concise and yet
complete, becomes particularly challenging when we set as an objective the
coverage of a specific technique that surrounds one or more components of a
report, a given administrative function surrounding all reports, and other
scenarios where the focus of the session is not the creation of reports, per
se, but where a report or reports has to be in place before we can begin to
cover the material with which the article concerns itself.

other factors add even more preparatory baggage, including the need in a given
lesson to have a particular condition (such as null fields in a data source,
for example) for which we set about providing a remedy, or providing a means of
exploit. When we combine the overhead involved in just "setting the
scene," the focus of the article is drowned in myriad steps simply to get
to a reasonable starting point.

The BlackBelt
articles represent an attempt to circumvent this. We will attempt to use
existing report samples or other "prefabricated" objects that either
come along as part of the installation of the applications involved, or that
are readily accessible to virtually any organization that has installed the
application. While we will often have to make modifications to the sample
involved (we will actually create a copy, to allow the original sample to
remain intact), to tune it to provide the backdrop we need to proceed with the
object or procedure upon which we wish to concentrate, we will still save a
great deal of time and distraction in getting to our objective. In some cases,
we will still have to start from scratch with preparation, but my intention
with the BlackBelt articles will be to avoid this, if at all


As we
discuss in my article MDX
Essentials: Logical Functions: The IsEmpty() Function
in working with multidimensional
data sets, we are often confronted with empty cells – data is often sparse in
these sets by their very physical nature. Because, as a simple example, every
product might not be sold at every store in every time period (to cite an
instance from the dimensions of the FoodMart2000 sample environment), we
will see empty cells in abundance in a data set that contains intersects of
these dimensions. (Particularly in working with crossjoins of any magnitude,
we will encounter many empty cells, as a general rule.) Empty cells mean nulls,
and nulls can mean incorrect results in using MDX to support analysis in

that range between failure of the report to execute and mere inconveniences (such as inordinate white space, bizarre
characters, and other formatting gaffes) can be the consequence of entraining
these nulls into a reporting application. Reporting Services is no exception,
and sooner or later, most report authors are going to find themselves facing a
need to manage null fields. While one of the many beauties of the MSAS / MSSQL
Server / Reporting Services combination is the fact that this is easily done
within more than one layer (for instance, within the OLTP database, OLAP cube,
or the report itself), we may find ourselves working with a combination or
environment where we do not have all of these options.

It is the type of
scenario where we have to manage the nulls within Reporting Services, for a
report whose data source is an OLAP cube, which this article addresses.
Management of nulls in reports based upon relational sources can be
accomplished in similar ways. (My tendency to focus on OLAP reporting is based
upon the fact that references abound that teach reporting for relational
sources in Reporting Services, but virtually no references to OLAP reporting
exist in any of the new books that have recently appeared; articles on the
subject are also universally, well, sparse.) In this session, we will:

  • Make
    structural changes to a copy of a sample report, based upon a sample cube, to
    meet the business requirements of a hypothetical group of information

  • Modify the
    report to exhibit null fields as a basis for our practice example;

  • Discuss
    management of nulls from the DataSet of the report;

  • Practice two
    approaches to managing the nulls by applying filtering techniques that work
    within Reporting Services;

  • Discuss the
    results that each of the filtering techniques can provide;

  • Preview the
    report to ascertain the effectiveness of each of the techniques.
William Pearson
William Pearson
Bill has been working with computers since before becoming a "big eight" CPA, after which he carried his growing information systems knowledge into management accounting, internal auditing, and various capacities of controllership. Bill entered the world of databases and financial systems when he became a consultant for CODA-Financials, a U.K. - based software company that hired only CPA's as application consultants to implement and maintain its integrated financial database - one of the most conceptually powerful, even in his current assessment, to have emerged. At CODA Bill deployed financial databases and business intelligence systems for many global clients. Working with SQL Server, Oracle, Sybase and Informix, and focusing on MSSQL Server, Bill created Island Technologies Inc. in 1997, and has developed a large and diverse customer base over the years since. Bill's background as a CPA, Internal Auditor and Management Accountant enable him to provide value to clients as a liaison between Accounting / Finance and Information Services. Moreover, as a Certified Information Technology Professional (CITP) - a Certified Public Accountant recognized for his or her unique ability to provide business insight by leveraging knowledge of information relationships and supporting technologies - Bill offers his clients the CPA's perspective and ability to understand the complicated business implications and risks associated with technology. From this perspective, he helps them to effectively manage information while ensuring the data's reliability, security, accessibility and relevance. Bill has implemented enterprise business intelligence systems over the years for many Fortune 500 companies, focusing his practice (since the advent of MSSQL Server 2000) upon the integrated Microsoft business intelligence solution. He leverages his years of experience with other enterprise OLAP and reporting applications (Cognos, Business Objects, Crystal, and others) in regular conversions of these once-dominant applications to the Microsoft BI stack. Bill believes it is easier to teach technical skills to people with non-technical training than vice-versa, and he constantly seeks ways to graft new technology into the Accounting and Finance arenas. Bill was awarded Microsoft SQL Server MVP in 2009. Hobbies include advanced literature studies and occasional lectures, with recent concentration upon the works of William Faulkner, Henry James, Marcel Proust, James Joyce, Honoré de Balzac, and Charles Dickens. Other long-time interests have included the exploration of generative music sourced from database architecture.

Latest Articles