我已經在SSRS中創建了報告,它在工作正常,在需要顯示記錄的構建器上工作。從C#窗口應用程序調用SSRS報告
現在我想從窗口應用程序調用報告作爲LOCALREPORT。我已通過參數要求報告。但它顯示錯誤A data source instance has not been supplied for the data source Dataset1
的代碼如下:
ReportV.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local;
LocalReport localreport = ReportV.LocalReport;
localreport.ReportPath = "Result.rdl";
ReportParameter _para_sid = new ReportParameter();
_para_sid.Name = "s";
_para_sid.Values.Add("313");
ReportParameter _para_courseid = new ReportParameter();
_para_courseid.Name = "Cid";
_para_courseid.Values.Add("BSB50207");
ReportParameter[] _rp = new ReportParameter[2];
_rp[1] = _para_sid;
_rp[0] = _para_courseid;
localreport.SetParameters(_rp);
ReportV.RefreshReport();