MOSS2007自定义aspx页面中使用ReportViewer控件
来源:互联网 发布:ren域名 编辑:程序博客网 时间:2024/04/25 17:53
在assemblies新增
<buildProviders> <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </buildProviders>
修改或新增httpHandlers
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
新增 safecontrol
<SafeControl Assembly="Microsoft.ReportViewer.WebForms,Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="Microsoft.Reporting.WebForms" TypeName="*" Safe="True" />
遇见错误:
The type 'Microsoft.SharePoint.Portal.Analytics.UI.ReportViewerMessages, Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' does not implement IReportViewerMessages
在webconfig 中 appsettings 下加入:
<remove key="ReportViewerMessages" />
参考:
http://blogs.msdn.com/b/solutions/archive/2007/10/29/installing-sql-reporting-services-and-moss-2007-on-the-same-port-default-80.aspx
http://social.msdn.microsoft.com/forums/en-US/sqlreportingservices/thread/228a697f-f391-4b04-8d30-aaca0e91130b/
遇见错误:
In remote mode, the Report Viewer control requires session state be enabled or Report Server connection information specified in the config file.
fix:
In your app's web.config make sure that the <pages> tag has the following properties:
<pages enableSessionState="true" enableViewState="true">
and in your <httpModules> section make sure you have the following entry:
<add name="Session" type="System.Web.SessionState.SessionStateModule"/>
and after the <httpModules> section, include: <sessionState mode="InProc" cookieless="false" timeout="20"/>
或者
Try using the following
<appSettings><add key="ReportViewerServerConnection" value="Microsoft.ReportingServices.UI.WebControlConnection, ReportingServicesWebUserInterface, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /><add key="ReportViewerTemporaryStorage" value="Microsoft.ReportingServices.UI.ReportViewerTemporaryStorage, ReportingServicesWebUserInterface, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /><add key="ReportServerUrl" value="your report server url" /></appSettings>
参考:
http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/024abdfb-967e-478b-acfe-739f7b7e693a/
http://forums.asp.net/t/1308086.aspx/1
遇到错误
That assembly does not allow partially trusted callers
Fix:
修改Web.config
<trust level="Full" originUrl="" />
参考:
http://social.msdn.microsoft.com/Forums/zh-SG/sharepointdevelopment/thread/1e47c5c8-4608-4da0-81d2-ce3d82272420
遇到错误
- The request failed with HTTP status 401: Unauthorized.
Fix:
新建类
[Serializable] public partial class ReportViewerCredentials : IReportServerCredentials { private string _userName; private string _password; private string _domain; public ReportViewerCredentials(string userName, string password, string domain) { _userName = userName; _password = password; _domain = domain; } public ReportViewerCredentials() { //_userName = userName; //_password = password; //_domain = domain; } public WindowsIdentity ImpersonationUser { get { //return null; return WindowsIdentity.GetCurrent(); } } public ICredentials NetworkCredentials { get { return new NetworkCredential(_userName, _password, _domain); //return System.Net.CredentialCache.DefaultCredentials; } } public bool GetFormsCredentials(out Cookie authCookie, out string userName, out string password, out string authority) { authCookie = null; userName = _userName; password = _password; authority = _domain; // Not using form credentials return false; } }
设定 reportviewer 的credentials
this.ReportViewer1.ServerReport.ReportServerCredentials = new ReportViewerCredentials("name", "password", "domain");
- MOSS2007自定义aspx页面中使用ReportViewer控件
- 如何在aspx页面中使用ascx控件(用户自定义的一个控件)?
- aspx页面中动态创建控件
- aspx页面中动态创建控件
- 如何在ASP.NET中制作Web用户自定义控件,并在aspx页面中使用它的方法和属性?
- aspx 遍历页面控件
- 如何在aspx网页中使用.net编译后的自定义用户控件
- aspx页面中使用<%= %>的注意事项
- 在aspx网页中使用program控件
- 如何在aspx页面中添加Silverlight控件
- 【BS】 如何向aspx窗体中添加一个自定义控件
- 自定义控件的使用(.aspx调用.ascx)
- ASP.NET自定义控件的BUG在ASPX页面中注册控件后不能打出标签的问题(本人已解决)
- SharePoint 2010 使用自定义aspx页面替换列表默认的新建(NewForm.aspx),查看(DispForm.aspx)和编辑(EditForm.aspx)页面
- WPF中使用ReportViewer报表
- WPF中使用ReportViewer报表
- 在SharePoint2010中添加ReportViewer控件
- 使用ASP.NET 2.0中的ReportViewer控件
- 支持windows 8的虚拟机软件
- increment与identity在数据库中插入再删除区别
- [iphone]XML 解析 之 TBXML 介绍
- XP同步时间服务器地址
- HDOJ Piggy-Bank
- MOSS2007自定义aspx页面中使用ReportViewer控件
- Socket I/O模型之完成端口(completion port)
- 创建表单-定制视图单元
- java.lang.Exception: Exception in sending Request :: null
- Centos 5.6 防火墙的管理
- android 对GIF动画格式的支持
- vc6 配置wtl
- 苹果与微软的用户文化
- VMWARE 安装 MAC OS X Snow Leopard 10.6.6