Hii,,
i am making a report in c#. but there is a problem when i set parameter in c# by coding it display only one record.
i send a multiple values from listbox but display only one in Crystal Report.
i use :
for(int i=0;i<code.length;i++)>
{
strSelection=strSelection+"'"+code[i]+"'"+",";
}
strSelection = strSelection.Substring(0, strSelection.Length - 1);
string str = "select crbal*-1 as crbal,glname, glcode,contprsn, refby, glphone1, glcity, glphone2, email, crlimit, restorddueamt from glmast WHERE drgroup='A3402' and crbal<>0 and glcode in(" + strSelection + ")";
SqlDataAdapter ad = new SqlDataAdapter(str, con2);
DataSet ds = new DataSet();
ad.Fill(ds);
path = Server.MapPath("Debtors_Total_Outstanding_Report.Rpt");
cr = new ReportDocument();
cr.Load(path);
cr.SetDataSource(ds.Tables[0]);
cr.SetParameterValue(0,ds.Tables[0].Rows[0][1].ToString());
cr.SetParameterValue(1,company_name);
cr.SetParameterValue(2, database_name);
CrystalReportViewer1.ReportSource = cr;
CrystalReportViewer1.DataBind();
please help me...
There are Three parameters in My Crystal Report.
Thanks and Regards....
Mitesh