ReportViewer 2010:how to hide pdf in export option in reportviewer
please help me out
how shoul i hide pdf in export option in reportviewersusana w
October 19th, 2011 4:57am
Hi Susana
From the RSReportSErver.Config file do add the syntax " Visible="false" at the end for PDF
<Render>
<Extension Name="XML" Type="Microsoft.ReportingServices.Rendering.DataRenderer.XmlDataReport,Microsoft.ReportingServices.DataRendering" Visible="True"/>
<Extension Name="NULL" Type="Microsoft.ReportingServices.Rendering.NullRenderer.NullReport,Microsoft.ReportingServices.NullRendering" Visible="True"/>
<Extension Name="CSV" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering" Visible="True"/>
<Extension Name="PDF" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.PDFRenderer,Microsoft.ReportingServices.ImageRendering" Visible="false"/>
<Extension Name="RGDI" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.RGDIRenderer,Microsoft.ReportingServices.ImageRendering" Visible="True"/>
<Extension Name="HTML4.0" Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.Html40RenderingExtension,Microsoft.ReportingServices.HtmlRendering" Visible="True"/>
<Extension Name="MHTML" Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.MHtmlRenderingExtension,Microsoft.ReportingServices.HtmlRendering" Visible="True"/>
<Extension Name="EXCEL" Type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering" Visible="True"/>
<Extension Name="RPL" Type="Microsoft.ReportingServices.Rendering.RPLRendering.RPLRenderer,Microsoft.ReportingServices.RPLRendering" Visible="false" LogAllExecutionRequests="false"/>
<Extension Name="IMAGE" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRenderer,Microsoft.ReportingServices.ImageRendering"/>
<Extension Name="WORD" Type="Microsoft.ReportingServices.Rendering.WordRenderer.WordDocumentRenderer,Microsoft.ReportingServices.WordRendering"/>
</Render>SUHAS http://suhaskudekar.blogspot.com/ Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.
Free Windows Admin Tool Kit Click here and download it now
October 19th, 2011 5:08am
Hi Bin,
This code does not work when I use IReportServerConnection2 interface to create sessionless report viewer on web page. Can you please tell me what could be the issue?
code is -
public IEnumerable<System.Net.Cookie> Cookies
{
get { return null; }
}
public IEnumerable<string> Headers
{
get { return null; }
}
#endregion
#region IReportServerConnection Members
public Uri ReportServerUrl
{
get { return new Uri(RSConfigurationManager.GetConfigKeyValue("ReportServerUrl")); }
}
public int Timeout
{
get { return Int32.Parse(RSConfigurationManager.GetConfigKeyValue("ReportServerTimeout")); }
}
#endregion
#region IReportServerCredentials Members
public bool GetFormsCredentials(out System.Net.Cookie authCookie, out string userName, out string password, out string authority)
{
HttpCookie cookie = HttpContext.Current.Request.Cookies[FormsAuthentication.FormsCookieName];
System.Net.Cookie _cookie = new Cookie();
_cookie.Domain = (cookie.Domain == string.Empty || cookie.Domain == null) ? HttpContext.Current.Request.ServerVariables["SERVER_NAME"] : cookie.Domain;
_cookie.Name = cookie.Name;
_cookie.HttpOnly = cookie.HttpOnly;
_cookie.Path = cookie.Path;
_cookie.Secure = cookie.Secure;
_cookie.Expires = cookie.Expires;
_cookie.Value = cookie.Value;
authCookie = _cookie;
userName = password = authority = null;
return true;
}
public System.Security.Principal.WindowsIdentity ImpersonationUser
{
get
{
return null;
}
}
public System.Net.ICredentials NetworkCredentials
{
get
{
//We're not using NetworkCredentials
return null;
}
}
#endregion
}Suresh Thakur
May 17th, 2012 11:19am
Hi Bin,
We're using local report processing with Visual Studio 2012 and can only disable PDF from the export menu using the code you've listed above. For some reason, this same code is not working for Excel or Word.
Any assistance would be appreciated.
Free Windows Admin Tool Kit Click here and download it now
October 15th, 2012 6:26pm