http://blog.csdn.net/even0220/article/details/6960540



RDL和RDLC在筛选导出项时有区别!


RDLC:需要在ReportViewer的PreRender方法中处理即可。

HTML:

[html] view plaincopy
  1. <rsweb:ReportViewer ID="rpvReportDL" runat="server" Width="973px"   
  2.    Height="470px" onprerender="reportViewer_PreRender">  
  3.    </rsweb:ReportViewer>  
CODE:

[csharp] view plaincopy
  1. protected void reportViewer_PreRender(object sender, EventArgs e)  
  2.     {  
  3.         foreach (RenderingExtension extension in rpvReportDL.LocalReport.ListRenderingExtensions())  
  4.         {  
  5.             if (extension.Name == "IMAGE" || extension.Name == "WORD")  
  6.             {  
  7.                 FieldInfo fi = extension.GetType().GetField("m_isVisible", BindingFlags.Instance | BindingFlags.NonPublic);  
  8.                 fi.SetValue(extension, false);  
  9.             }  
  10.         }  
  11.     }    

RDL:修改配置文件

File: Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\RSReportDesigner.config

别忘记重启 Reporting Services

Enabled:

[html] view plaincopy
  1. <Extension Name="EXCEL"   
  2. Type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering"/>  


Disabled:

[html] view plaincopy
  1. <Extension Name="EXCEL"   
  2. Type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering"   
  3. Visible="false"/>  


本文转载:CSDN博客