Book Image

SQL Server 2016 Reporting Services Cookbook

By : Dinesh Priyankara, Robert Cain
Book Image

SQL Server 2016 Reporting Services Cookbook

By: Dinesh Priyankara, Robert Cain

Overview of this book

Microsoft SQL Server 2016 Reporting Services comes with many new features. It offers different types of reporting such as Production, Ad-hoc, Dashboard, Mash-up, and Analytical. SQL Server 2016 also has a surfeit of new features including Mobile Reporting, and Power BI integration. This book contains recipes that explore the new and advanced features added to SQL Server 2016. The first few chapters cover recipes on configuring components and how to explore these new features. You’ll learn to build your own reporting solution with data tools and report builder, along with learning techniques to create visually appealing reports. This book also has recipes for enhanced mobile reporting solutions, accessing these solutions effectively, and delivering interactive business intelligence solutions. Towards the end of the book, you’ll get to grips with running reporting services in SharePoint integrated mode and be able to administer, monitor, and secure your reporting solution. This book covers about the new offerings of Microsoft SQL Server 2016 Reporting Services in comprehensive detail and uses examples of real-world problem-solving business scenarios.
Table of Contents (18 chapters)
SQL Server 2016 Reporting Services Cookbook
Credits
About the Authors
About the Reviewers
www.Packtpub.com
Preface

Referencing external .NET assemblies


You have already seen the way of adding custom code to reports and you may have already experienced the issues with it such as:

  • It supports only Vb.NET

  • The same function has to be added to each and every report

With this recipe, we can overcome it by making an assembly that contains all required functions and use it with the report rather repeating it in every report.

Getting ready

In order to make an assembly with all required functions, you need to create a .NET class library using one of .NET languages. Yes, it is not limited to Vb.NET. Let's make one using C#.NET language.

Follow these steps for creating a class library:

  1. Open the Visual Studio and create a C#.NET Class Library project. Name it as StandardFunctions.

  2. Create a public class called Functions and add a public static method named GetTextColor:

          using System; 
          using System.Collections.Generic; 
          using System.Linq; 
          using System.Text; 
          using System.Threading...