我一直试图让报告查看器工作几天而没有运气。我已经遵循了几个不同的教程,但仍然没有骰子。
我要做的是创建一个webform,以允许用户查看带参数的远程SRSS报告。使用以下代码:
protected void ddlTask_OnSelectedIndexChanged(object sender, EventArgs e)
{
ReportViewer1.ProcessingMode = ProcessingMode.Remote;
ServerReport serverReport = ReportViewer1.ServerReport;
serverReport.ReportServerUrl = new Uri("http://Server/reportserver");
serverReport.ReportPath = "/QAQC_Reports/" + sqlCommands.GetSpecificFormReportName(ddlType.SelectedValue);
ReportParameter BU = new ReportParameter("@BU", ddlBusinessUnit.SelectedValue);
ReportParameter TID = new ReportParameter("@TID", ddlTask.SelectedValue);
ReportViewer1.ServerReport.SetParameters(new[] { BU, TID });
}
在我的aspx页面上,我有以下内容:
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<rsweb:ReportViewer ID="ReportViewer1" runat="server" ProcessingMode="Remote"></rsweb:ReportViewer>
我想我差不多了,但是我收到了以下错误:
授予用户“domain \ computername $”的权限不足以执行此操作。 (rsAccessDenied)