Groups | Blog | Home
all groups > sql server reporting services > august 2005 >

sql server reporting services : SetReportParameters Help


rain
8/1/2005 4:05:41 PM
Can anyone explain to me how to use the SetReportParameters method? Or,
maybe point me to some sample code or something?

I'm having trouble with it and the documentation isn't completely clear (at
least for me).

I have reports and a custom ASP.NET UI that allows users to enter new
parameter field values. When the user clicks "Save Report" (a linkbutton) I
want to update the ReportServer with the new values.

Thanks.

Jack Truneh
11/30/2005 1:12:03 PM
private void SetTheRptParameters()
{
ReportParameter[] param = new ReportParameter[2];
param[0] = new ReportParameter
("param1","param1value",false);
param[1] = new ReportParameter
("param2","param2value", false);
this.ReportViewer1.ServerReport.SetParameters(param);
this.ReportViewer1.ServerReport.Refresh();
}

This works , if the parameter is not multivalued ,if it is pass string[] and
AddThis Social Bookmark Button