SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Development Tools
 Reporting Services Development
 Disabling export options in SSRS viewer
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

itmanager8815
Starting Member

3 Posts

Posted - 10/10/2012 :  08:17:27  Show Profile  Reply with Quote
We're using Visual Studio 2012 and the new ReportViewer control version 11. We have code that successfully disabled the PDF export option on the report viewer in Visual Studio 2010, ReportViewer v10, but no longer works in the latest edition of Visual Studio (2012). The error is that the field "m_previewService" is no longer found using Reflection.

Const Flags As System.Reflection.BindingFlags = System.Reflection.BindingFlags.NonPublic Or System.Reflection.BindingFlags.Public Or System.Reflection.BindingFlags.Instance

'the line below returns a null reference

Dim m_previewService As System.Reflection.FieldInfo = ReportViewer1.LocalReport.GetType().GetField("m_previewService", Flags)

This code worked fine in VS 2010. Can anyone tell us how to disable the PDF export option or how to get the code above to work?

Thanks for your assistance.

visakh16
Very Important crosS Applying yaK Herder

India
52323 Posts

Posted - 10/11/2012 :  00:26:39  Show Profile  Reply with Quote
you can tweak rendering formats in report.config

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

itmanager8815
Starting Member

3 Posts

Posted - 10/11/2012 :  14:17:10  Show Profile  Reply with Quote
Thank you for your response.

Would you be able to provide some examples as to how this can be done? For example, let's say we did not want the PDF export format to appear when exporting.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52323 Posts

Posted - 10/11/2012 :  15:47:00  Show Profile  Reply with Quote
see

http://msdn.microsoft.com/en-us/library/ms156281.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

itmanager8815
Starting Member

3 Posts

Posted - 10/12/2012 :  17:50:39  Show Profile  Reply with Quote
Thanks. This will also not work for us as we are using Local Mode processing to run the reports and do not have access to Report Server.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.22 seconds. Powered By: Snitz Forums 2000