DataSetCashierReceiptsResi dsReceiptsResi = new DataSetCashierReceiptsResi(); DataTable dtReceiptsResi = new DataTable(); dtReceiptsResi.Columns.Add("TransNo", typeof(string)); dtReceiptsResi.Columns.Add("CustomerName", typeof(string)); dtReceiptsResi.Columns.Add("Description", typeof(string)); dtReceiptsResi.Columns.Add("Amount", typeof(decimal)); dtReceiptsResi.Columns.Add("BalDue", typeof(decimal)); dtReceiptsResi.Columns.Add("Salesman", typeof(string)); DataTable dtReceiptsResi_CASH = new DataTable(); dtReceiptsResi_CASH.Columns.Add("TransNo", typeof(string)); dtReceiptsResi_CASH.Columns.Add("CashData", typeof(string)); dtReceiptsResi_CASH.Columns.Add("CashAmount", typeof(decimal));
#region CASHIER PRINT RECEIPTS RESI dtReceiptsResi = print.CashierPrintReceiptsResi(); // BIND CREDIT INVOICES RESIDENTIAL dsReceiptsResi.Tables["DataTable1"].Merge(dtReceiptsResi); MessageBox.Show(dsReceiptsResi.Tables["DataTable1"].Rows.Count.ToString()); rptDoc.Subreports[4].SetDataSource(dtReceiptsResi); rptDoc.Subreports[4].DataSourceConnections.Clear(); #endregion #region CASHIER PRINT RECEIPTS RESI CASH ONLY dtReceiptsResi = print.CashierPrintReceiptsResiCashOnly(); // BIND CREDIT INVOICES RESIDENTIAL dsReceiptsResi.Tables[dsReceiptsResi.DataTable11.TableName].Merge(dtReceiptsResi); MessageBox.Show(dsReceiptsResi.Tables["DataTable11"].Rows.Count.ToString()); DataView ddd = new DataView(dsReceiptsResi.Tables["DataTable11"]); for (int k = 0; k < 4; k++) { MessageBox.Show(ddd[k]["TransNo"].ToString() + " %%% " + ddd[k]["CashData"].ToString() + " %%% " + ddd[k]["CashAmount"].ToString() + " %%% "); } rptDoc.Subreports[4].SetDataSource(dsReceiptsResi.Tables["DataTable11"]); rptDoc.Subreports[4].DataSourceConnections.Clear(); #endregion
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)