protected void Page_Load(object sender, EventArgs e){ TextBox1.Text = Session["Selected"].ToString(); TextBox2.Text = Session["ReportBy"].ToString(); TextBox3.Text = Session["FromDate"].ToString(); TextBox4.Text = Session["ToDate"].ToString(); CrystalReportSource1.Report.FileName = Server.MapPath("Reports/RptExpiryListByitem.rpt"); ParameterDiscreteValue objDiscreteValue; ParameterField objParameterField; objDiscreteValue = new ParameterDiscreteValue(); objParameterField = new ParameterField(); objDiscreteValue.Value =TextBox1.Text; objParameterField = CrystalReportViewer1.ParameterFieldInfo["@strIDs"]; objParameterField.CurrentValues.Add(objDiscreteValue); CrystalReportViewer1.ParameterFieldInfo.Add(objParameterField); objDiscreteValue.Value = TextBox2.Text; objParameterField = CrystalReportViewer1.ParameterFieldInfo["@intFilterType"]; objParameterField.CurrentValues.Add(objDiscreteValue); CrystalReportViewer1.ParameterFieldInfo.Add(objParameterField); objDiscreteValue.Value = TextBox3.Text; objParameterField = CrystalReportViewer1.ParameterFieldInfo["@dtFromDate"]; objParameterField.CurrentValues.Add(objDiscreteValue); CrystalReportViewer1.ParameterFieldInfo.Add(objParameterField); objDiscreteValue.Value = TextBox4.Text; objParameterField = CrystalReportViewer1.ParameterFieldInfo["@dtToDate"]; objParameterField.CurrentValues.Add(objDiscreteValue); CrystalReportViewer1.ParameterFieldInfo.Add(objParameterField); CrystalReportViewer1.ReportSourceID = "CrystalReportSource1";}