O'Reilly logo

SQL Server 2016 Reporting Services Cookbook by Robert C. Cain, Dinesh Priyankara

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required