1

我正在尝试制作一个包含子报告的 rdl 报告。当我预览报告时一切正常。但是在我部署报告 n 子报告并尝试通过程序运行它之后,我得到一个错误。“子报告无法显示”

            this.ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
            this.ReportViewer1.ServerReport.ReportServerUrl = new Uri("http://192.168.50.187/ReportServer");
            this.ReportViewer1.ServerReport.ReportPath = "/ReportServer/ChartOfAccounts";

            this.ReportViewer1.ShowParameterPrompts = false;

            IReportServerCredentials irsc = new CustomReportCredentials("Report_user", "ipix.123", "IPIXSOLUTIONS");
            this.ReportViewer1.ServerReport.ReportServerCredentials = irsc;
            ReportParameter[] parm = new ReportParameter[3];

            parm[0] = new ReportParameter("company_ID", Convert.ToString(4));

            parm[1] = new ReportParameter("accntGrplvl1_ID", Convert.ToString(1));

            parm[2] = new ReportParameter("accntGrplvl2_ID", Convert.ToString(2));
            this.ReportViewer1.ServerReport.SetParameters(parm);

           this.ReportViewer1.ServerReport.Refresh();

这是我的代码。我也必须为子报告提供一些代码吗?。两个 ma 报告都在同一个文件夹中。子报告的参数取自主报告本身。我哪里出错了?

4

0 回答 0