2using System.Data; 3using System.Data.SqlClient; 4using System.Configuration; 5using System.Collections; 6using System.Web; 7using System.Web.Security; 8using System.Web.UI; 9using System.Web.UI.WebControls; 10using System.Web.UI.WebControls.WebParts; 11using System.Web.UI.HtmlControls; 12using Microsoft.ApplicationBlocks.Data; 13using Microsoft.Reporting.WebForms; 14 15public partial class ReportViewerLocalMode : System.Web.UI.Page 16{ 17 public string thisConnectionString = 18 ConfigurationManager.ConnectionStrings[ 19 "NorthwindConnectionString"].ConnectionString; 20 21 /**//*I used the following statement to show if you have multiple 22 input parameters, declare the parameter with the number 23 of parameters in your application, ex. New SqlParameter[4]; */ 24 25 public SqlParameter[] SearchValue = new SqlParameter[1]; 26 27 protected void RunReportButton_Click(object sender, EventArgs e) 28 { 29 //ReportViewer1.Visible is set to false in design mode 30 ReportViewer1.Visible = true; 31 SqlConnection thisConnection = new SqlConnection(thisConnectionString); 32 System.Data.DataSet thisDataSet = new System.Data.DataSet(); 33 SearchValue[0] = new SqlParameter("@CategoryName", 34 DropDownList1.SelectedValue); 35 36 /**//* Put the stored procedure result into a dataset */ 37 thisDataSet = SqlHelper.ExecuteDataset(thisConnection, 38 "ShowProductByCategory", SearchValue); 39 40 /**//*or thisDataSet = SqlHelper.ExecuteDataset(thisConnection,