Hi EveryBody,
I want to print a bill below like this
Date :- 10/25/14
abc
Date Amount Qty
---------------------------------------------------
21-10-2014
---------------------------------------------------
Sales = 33.00 3
Purchase = 30.00 3
Sliver Coins
(Worth Rs.) = 0 0
G.P. = 3.00
Bal = 30.00
----------------------------------------------------
Cancel = 0
23-10-2014
----------------------------------------------------
Sales = 33.00 3
Purchase = 30.00 3
Sliver Coins
(Worth Rs.) = 0 0
G.P. = 3.00
Bal = 30.00
----------------------------------------------------
Cancel = 0
----------------------------------------------------
Payable : 60.00
----------------------------------------------------
How's this posslible in c#.
I am make the code like below for making this type of receipt in c#.
// Code
DataSet _dtRecord = _clsComm.GetPurchaseReportNew(userId: clsCommonOperations.UserID, startDate: StartDate, endDate: EndDate);
if (_dtRecord.Tables[0].Rows.Count > 0)
{
sb.AppendLine("\t\t Date :- " + DateTime.Now.ToShortDateString());
sb.AppendLine("\t\t " + clsCommonOperations.USERNAME.ToString());
sb.AppendLine("\t Date \t\t Amount \t Qty");
sb.AppendLine("-------------------------------------------------------------------");
for (int i = 0; i < _dtRecord.Tables[1].Rows.Count; i++)
{
DataRow[] drw = _dtRecord.Tables[0].Select("recordDate='" + _dtRecord.Tables[1].Rows[i][0].ToString()+"'");
if (drw.Length > 0)
{
sb.AppendLine(_dtRecord.Tables[1].Rows[i][0].ToString());
sb.AppendLine("-------------------------------------------------------------------");
sb.AppendLine("Sales \t\t = \t " + drw[0]["Sales"].ToString().Trim() + " \t " + drw[0]["qty"].ToString().Trim());
sb.AppendLine("Purchase \t = \t " + drw[0]["Purchase"].ToString().Trim() + " \t " + drw[0]["qty"].ToString().Trim());
sb.AppendLine("Sliver Coins");
sb.AppendLine("(Worth Rs.)\t = \t "+drw[0]["Receipt"].ToString().Trim()+" \t "+ drw[0]["TotalPendingReceipt"].ToString().Trim());
sb.AppendLine("G.P. \t\t = \t "+drw[0]["GP"].ToString().Trim());
sb.AppendLine("Bal \t\t = \t "+drw[0]["Bal"].ToString().Trim());
sb.AppendLine("-------------------------------------------------------------------");
sb.AppendLine("");
sb.AppendLine("Cancel \t\t = \t "+drw[0]["cancel"].ToString().Trim());
}
}
if (_dtRecord.Tables[2].Rows.Count > 0)
{
sb.AppendLine("-------------------------------------------------------------------");
sb.AppendLine("Payable \t\t : \t " + _dtRecord.Tables[2].Rows[0][0].ToString().Trim());
sb.AppendLine("-------------------------------------------------------------------");
}
richTextBox1.AppendText(sb.ToString());
But I do not want to know how to print this record as bill
Please help me how to print this bill as pos espon print