I want to get all records from database to my crystal report. but I only get the first row. I want to get all records to my invoice bill.
this is my query:
reportDocument.Load(@"E:New PracticalProjectsWCC-StockManagementSystemWCC-StockManagementSystemReportsInvoiceReport.rpt");
using (SqlConnection con = new SqlConnection(CS))
{
DataSet ds = new DataSet();
SqlDataAdapter sda = new SqlDataAdapter("select MAX(InvoiceNo) InvoiceNo, MAX(Cashier) Cashier, ItemName, SUM(Quantity) Quantity, MAX(ItemCode) ItemCode, MAX(DiscountPrice) DiscountPrice, MAX(Amount) Amount, MAX(GrossAmount) GrossAmount, MAX(Cash) Cash, MAX(Balance) Balance, MAX(NoOfItems) NoOfItems from tblInvoice Group by ItemName ", con);
DataTable dt = new DataTable();
sda.Fill(dt);
reportDocument.SetDataSource(dt);
crvInvoiceReport.ReportSource = reportDocument;
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…