Disabling Export Options in Reporting Services

Posted by & filed under , .

The other day, I was asked how to disable export options for one of the reports I am developing at my current client.  Having not fielded this request previously, I checked the around found you are able to disable export options for each reporting services instance

In the rsreportserver.config file you can set Visible="false" on the <Extension> elements in the <Render> element that shouldn’t be accessible.  This also affects the email delivery extension.

<Render>
    <Extension Name="XML" Type="Microsoft.ReportingServices.Rendering.XmlDataRenderer.XmlDataReport,Microsoft.ReportingServices.XmlRendering"/>
    <Extension Name="NULL" Type="Microsoft.ReportingServices.Rendering.NullRenderer.NullReport,Microsoft.ReportingServices.NullRendering" Visible="false"/>
    <Extension Name="CSV" Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering"/>
    <Extension Name="IMAGE" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.ImageReport,Microsoft.ReportingServices.ImageRendering"/>
    <Extension Name="PDF" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.PdfReport,Microsoft.ReportingServices.ImageRendering"/>
    <Extension Name="RGDI" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.RemoteGdiReport,Microsoft.ReportingServices.ImageRendering" Visible="false" LogAllExecutionRequests="false"/>
    <Extension Name="HTML4.0" Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.Html40RenderingExtension,Microsoft.ReportingServices.HtmlRendering" Visible="false" LogAllExecutionRequests="false"/>
    <Extension Name="HTML3.2" Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.Html32RenderingExtension,Microsoft.ReportingServices.HtmlRendering" Visible="false"/>
    <Extension Name="MHTML" Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.MHtmlRenderingExtension,Microsoft.ReportingServices.HtmlRendering"/>
    <Extension Name="EXCEL" Type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering"/>
</Render>

The problem with this solution though is that it is for the entire reporting services site.  If only one or two reports need a certain extract type removed, you need to either remove the type for all extracts or live with the issues that exporting to that extract type causes.

There should be properties on each report that will disable or enable extract types.  I can’t see how it would be that difficult to store this information and access it rendering the report.  The toolbar is already reading an XML file to determine the extract types to make available, it should be a significant leap to query this information from the database as each report is called.