changing Password dynamically in crystal report
Could any one please tell me how do i change the parameters dynamically for a crystal report.
for the first time i am setting the parameter value like this :
dd1.SetParameterValue("id",12);
CrystalReportViewer1.ReportSource=dd1;
it works fine..
but on click of a button "refresh" i want to set the parameter value to a value from textBox "EmpID"
and Re Bind the CrystalReportViewer
i am using this code:
private void Refresh_Click(object sender, System.EventArgs e)
{
CrystalReport3 cr=new CrystalReport3();
int id=int.Parse(EmpID.Text);
cr.SetParameterValue("id",14);
CrystalReportViewer1.ReportSource=cr;
CrystalReportViewer1.DataBind() ;
}
its not working!!
whats wrong or whats missing
Plz help
thanks in advance
Irfan
|