Quantcast
Channel: SQL Server Reporting Services
Viewing all articles
Browse latest Browse all 1418

How to disable a export in Report Viewer 10.0.0.0

$
0
0

Dear all,

I am using Report Viewer 10.0.0.0 to view the report in Sql Reporting Service 2008R2.

I want to disable a export(ex:Excel,PDF) of ReportViewer in code behind.

I try some code for Report Viewer 8.0.0.0 like that :

var info = extension.GetType().GetField("m_serverExtension", BindingFlags.NonPublic | BindingFlags.Instance);
            if (info != null)
            {
                var rsExtension = info.GetValue(extension) as OldVer::Microsoft.SqlServer.ReportingServices2005.Execution.Extension;
                if (rsExtension != null)
                {
                    rsExtension.Visible = false;
                }
                //info.SetValue(extension, false);
            }

But seem it does work with Report Viewer 10.0.0.0.

Can you please help me a solution to disable  a export in Report Viewer 10.0.0.0 ?

Thank you very much.




Viewing all articles
Browse latest Browse all 1418

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>