The source of the report definition has not been specified

前端 未结 6 1205
别那么骄傲
别那么骄傲 2020-12-21 12:41

I\'m using the following code trying to SetParametr :

    var report = new ReportParameter[1];
    report[0] = new ReportParameter(\"MyName\", \"Raha\");
            


        
6条回答
  •  时光取名叫无心
    2020-12-21 13:39

    I had the same problem today, in my case the reason "copy-paste" issue. Just replacing ServerReport with LocalReport in the code below solved the problem. Change

    _reportViewer.LocalReport.DataSources.Add(reportDataSource1);
    

    to

    _reportViewer.ServerReport.SetParameters(report);
    

提交回复
热议问题