sqlconn.Open();
da =
da.Fill(DS.TestReport);//DS is a DataSet object .
myCrystalReport1.SetDataSource(DS);
paramfield.Name =
discreteval.Value = "10";
paramfields.Add(paramfield);
crystalReportViewer1.ParameterFieldInfo = paramfields;
crystalReportViewer1.ReportSource = myCrystalReport1;
crystalReportViewer1.Refresh();
sqlconn.Close();and I create a parameter in report :"myfirstname" and in Formula editor , I wrote this :if {?myfirstname}="10" then {TestReport.firstname} = {?myfirstname}Now , I want to say :1 - how can i use this variable (myNumber) in Form1.cs .2 - I want to be shown all of the record firstname field ,how can i do it in :discreteval.Value = ???????????????????thanks for any help .Regards ,