Writing a Rendering Extension for Reporting Services 2005
Retrieved from my old SharePoint blog: http://vspug.com/kwanl/2007/05/03/writing-a-rendering-extension-for-reporting-services-2005/
One glaring omission from the out-of-the-box SSRS 2005 output formats is plain text ASCII. I know there is a CSV option available but CSV is primarily used for data-interchange. My goal was to create a custom rendering extension to output reporting services reports as attractive as possible in plain text ASCII.
Conceptually, the process is simple, you provide a class that implements the Microsoft.ReportingServices.ReportRendering.IRenderingExtension interface and add an entry to the rsreportserver.config file for your assembly.
The IRenderingExtension interface is really straight-forward and there are only a few methods you have to implement with Render and RenderStream being the most important (and challenging).
The rsreportserver.config file controls various settings for the Report Server including which extensions are available. To add a rendering extension, you add a new Extension element under the Extensions/Render element.
For example, this adds an extension for a rendering extension name SimpleRenderer.Class1 in the assembly SimpleRenderer.dll.
<Extension Name=”Kwan” Type=”SimpleRenderer.Class1,SimpleRenderer” Visible=”true” />
In addition to modifying the configuration file you need to make sure your assembly is fully trusted. This is because the classes in Microsoft.ReportingServices.ReportRendering only support fully trusted callers. There are several ways to do this but the preferred method is to update the policy file to give your specific assembly full trust.
Add the following to your rssrvpolicy.config (specifying the public key blob for your assembly):
Description=”This code group grants SimpleRenderer code full trust. “>