C# Web アプリケーションで Crystal Report を使用しています。Crystal レポートが For ループから最後のレコードをロードするという問題があります。
i は、コードとして for ループに product のコードを格納します。そして、その単一または複数のコードに従って、クリスタルレポートに情報が表示されます。その製品の。
私が使う....
for (int i = 0; i < code.Length; i++)
{
string str = "select crbal*-1 as crbal, glname, contprsn, refby, glphone1, glcity, glphone2, email, crlimit, restorddueamt from db1.dbo.glmast WHERE drgroup='A3402' and crbal<>0 and glcode="+code[i]+ "";
SqlDataAdapter ad = new SqlDataAdapter(str, con2);
DataSet ds = new DataSet();
ad.Fill(ds);
path = Server.MapPath("ERP_REPORT_MAIN.rpt");
cr = new ReportDocument();
cr.Load(path);
cr.SetDataSource(ds.Tables[0]);
CrystalReportViewer1.ReportSource = cr;
}
for ループに 2 つのコードがある場合、最後のレコードのみを表示します。私を助けてください。
よろしくお願いします... Mitesh