0

我的代码如下所示,编译后显示空白页面:

ReportViewerControl = new ReportViewer();
            ShowZoomControl="false"
            ReportViewerControl.ServerReport.ReportServerUrl = new Uri(ReportServerUri);
            ReportViewerControl.ServerReport.ReportPath = Model.Report.ReportPath;
            ReportViewerControl.Visible = true;
            ReportViewerControl.ShowReportBody = true;
            ReportViewerControl.ShowParameterPrompts = false;
            ReportViewerControl.ProcessingMode = ProcessingMode.Remote;
            ReportViewerControl.ShowZoomControl = false;
            ReportViewerControl.ShowBackButton = false;
            ReportViewerControl.InteractivityPostBackMode = InteractivityPostBackMode.AlwaysAsynchronous;
            ReportViewerControl.Height = 780;
            ReportViewerControl.Width = 800;

            IList<ReportParameter> FishSpeciesParameters = new List<ReportParameter>();
            ReportParameter SPStatus = new ReportParameter();
            SPStatus.Name = "SPStatus";
            if (Model.Report.ID == 8)
                SPStatus.Values.Add("T,E,C");
            ReportParameter FishCode = new ReportParameter();
            FishCode.Name = "FishCode";
            FishCode.Values.Add("11");
            FishSpeciesParameters.Add(SPStatus);
            FishSpeciesParameters.Add(FishCode);

            ReportViewerControl.ServerReport.SetParameters(FishSpeciesParameters);

            ReportViewerControl.ServerReport.Refresh();

有什么想法可以即时查看 SSRS 报告到 ReportViewer 中吗?

4

1 回答 1

0

maily,您只需将 ServerReport.ReportServerUrl 设置为如下所示:

"http://localhost:8080/ReportServer"

和报告路径

reportFolder + "/" + reportName;
于 2012-04-17T14:23:51.647 回答