public partial class SessionVariable : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
LabFromCustomer.Text = Session["@FromCustomerName"].ToString();
LabToCustomer.Text = Session["@ToCustomerName"].ToString();
LabFromDate.Text = Session["@FromDate"].ToString();
LabToDate.Text = Session["@ToDate"].ToString();
CrystalReportViewer1.Visible = false;
CrystalReportViewer1.Visible = true;
CrystalReportSource1.Report.FileName = Server.MapPath("Reports/Customer_totalsalesTest.rpt");
ParameterDiscreteValue objDiscreteValue;
ParameterField objParameterField;
//Set value for first parameter.....
objDiscreteValue = new ParameterDiscreteValue();
objDiscreteValue.Value = LabFromDate.Text;
objParameterField = CrystalReportViewer1.ParameterFieldInfo["@FromDate"];
objParameterField.CurrentValues.Add(objDiscreteValue);
CrystalReportViewer1.ParameterFieldInfo.Add(objParameterField);
objParameterField = CrystalReportViewer1.ParameterFieldInfo["@ToDate"];
//Set value for second parameter......
objDiscreteValue = new ParameterDiscreteValue();
objDiscreteValue.Value = LabToDate.Text;
objParameterField.CurrentValues.Add(objDiscreteValue);
CrystalReportViewer1.ParameterFieldInfo.Add(objParameterField);
//Set value for Third parameter......
objDiscreteValue = new ParameterDiscreteValue();
objDiscreteValue.Value = LabFromCustomer.Text;
objParameterField = CrystalReportViewer1.ParameterFieldInfo["@FromCustomerName"];
objParameterField.CurrentValues.Add(objDiscreteValue);
CrystalReportViewer1.ParameterFieldInfo.Add(objParameterField);
objDiscreteValue = new ParameterDiscreteValue();
objParameterField = CrystalReportViewer1.ParameterFieldInfo["@ToCustomerName"];
objDiscreteValue.Value = LabToCustomer.Text;
objParameterField.CurrentValues.Add(objDiscreteValue);
CrystalReportViewer1.ParameterFieldInfo.Add(objParameterField);
CrystalReportViewer1.ReportSourceID = "CrystalReportSource1";
}
}
when i Execute First page then asking for 4 value DropdownList1,DropdownList2,Datepicker1,Datepicker2 ..i choose these value when i click button then SessionVariable.aspx execute and show the crystal report everything working nice till now ...
when i want change the value of parameter then i need to close the page and Re-Execute the page ........
please help me ...how can i Changed the parameter value to change theese value DropdownList1,DropdownList2,Datepicker1,Datepicker2 in one time execution.....whats i edit in my code for that.......