110 likes | 237 Views
Extending SSRS with Custom Code. Devin Knight (@knight_devin) Pragmatic Works BI Consultant and Trainer. About Me. BI Consultant and Trainer with Pragmatic Works Author of 3 SQL Server books MCP, MCITP Certified Has spoke at past events like PASS, Code Camps, User Groups and SQL Saturdays.
E N D
Extending SSRS with Custom Code Devin Knight (@knight_devin) Pragmatic Works BI Consultant and Trainer
About Me BI Consultant and Trainer with Pragmatic Works Author of 3 SQL Server books MCP, MCITP Certified Has spoke at past events like PASS, Code Camps, User Groups and SQL Saturdays
Agenda Why Use Custom Code? Direct Embedding External Assemblies
Why Use Custom Code? Extends the capability of SSRS Expressions Compartmentalize reusable code Consistency among Report Developers Does not work with Report Parts
Agenda Why Use Custom Code? Direct Embedding External Assemblies
Using Embedded Code Pros More than one function can be embedded but not ideal Immediately see the results of code without creating a VS project Cons Must use Visual Basic No intellisense in the code window Code errors are not visible until report preview
Using Embedded Code Only way to debug results is to Preview a report Fields must be represented with expressions using this template: =Code.FunctionName(Parameter)
Agenda Why Use Custom Code? Direct Embedding External Assemblies
Using External Assemblies Pros Can be any .Net language Updates to code can be managed from outside of SSRS Cons Deployment is a bit tedious Assemblies will have restricted access to system resources
Using External Assemblies Cont. Create VS project and “strong name” the assembly <Assembly: AllowPartiallyTrustedCallers()> DLL must be deployed to: C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer\bin and install into the Global Assembly Cache (GAC) C:\Windows\assembly Compartmentalize reusable code