Passing Credentials to Sql Report Server 2008

后端 未结 4 1106
时光取名叫无心
时光取名叫无心 2020-12-05 18:49

I am pretty new in C# and my English is not so good - sorry in advance if I miss a point.

I tried to build an ASP.NET web site with a ReportService cont

4条回答
  •  有刺的猬
    2020-12-05 19:33

    you can use the following code in page load event to give parameters

    ReportParameter[] reportParameterCollection = new ReportParameter[1]; //Array size describes the number of paramaters.
    reportParameterCollection[0] = new ReportParameter();
    reportParameterCollection[0].Name = "ACCMGR";   //Give Your Parameter Name
    reportParameterCollection[0].Values.Add("12"); //Pass Parametrs's value here.
    ReportViewer1.ServerReport.SetParameters(reportParameterCollection);
    ReportViewer1.ServerReport.Refresh();
    

    I hope the this works for you

提交回复
热议问题