private string repReceiptno(string SubDivision, string CounterName, string fromdate, string todate, string userid, string Receiptno) { report_Prop reportProp = new report_Prop(); reportProp.SubDivision = SubDivision; reportProp.CounterName = CounterName; reportProp.fromdate = fromdate; reportProp.todate = todate; reportProp.UserId = userid; reportProp.Receiptno = Receiptno; report_bal reportbal = new report_bal(); DataTable dt = reportbal.Receiptno(reportProp); StringBuilder sb = new StringBuilder(); if (reportbal.ErrMessage != "" && reportbal.ErrMessage != null) { return("0#" + reportbal.ErrMessage + "$"); } else { sb.Append("<tr>"); sb.Append("<th colspan=10>" + "Cashier location allocation report" + "</th>"); sb.Append("</tr>"); sb.Append("<tr>"); sb.Append("<th>" + "Sr No" + "</th>"); sb.Append("<th>" + "ACCNo" + "</th>"); sb.Append("<th>" + "PAYDATE" + "</th>"); sb.Append("<th>" + "COUNTERNO" + "</th>"); sb.Append("<th>" + "ReceiptNo" + "</th>"); sb.Append("<th>" + "AMOUNT" + "</th>"); sb.Append("<th>" + "CASH/CHEQUE" + "</th>"); sb.Append("<th>" + "CHEQUENO" + "</th>"); sb.Append("<th>" + "USER" + "</th>"); sb.Append("<th>" + "Print" + "</th>"); sb.Append("</tr>"); if (dt.Rows.Count > 0) { sb.Append("$"); for (int i = 0; i < dt.Rows.Count; i++) { sb.Append("<tr>"); sb.Append("<td>" + dt.Rows[i]["SrNo"].ToString() + "</td>"); sb.Append("<td>" + dt.Rows[i]["ACCNo"].ToString() + "</td>"); sb.Append("<td>" + dt.Rows[i]["PAYDATE"].ToString() + "</td>"); sb.Append("<td>" + dt.Rows[i]["COUNTERNO"].ToString() + "</td>"); sb.Append("<td>" + dt.Rows[i]["ReceiptNo"].ToString() + "</td>"); sb.Append("<td>" + dt.Rows[i]["AMOUNT"].ToString() + "</td>"); sb.Append("<td>" + dt.Rows[i]["CASH/CHEQUE"].ToString() + "</td>"); sb.Append("<td>" + dt.Rows[i]["CHEQUENO"].ToString() + "</td>"); sb.Append("<td>" + dt.Rows[i]["USER"].ToString() + "</td>"); sb.Append("<td ><img src='images/print.jpeg' alt='delete' onclick=PrintReceipt('"); sb.Append(dt.Rows[i]["paymentid"].ToString().Trim() + "') /></td>"); sb.Append("</tr>"); } } else { sb.Append("<tr><td>No Record Found</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>"); } //sb.Append("<tr><td colspan='9'>No Record Found</td></tr>"); } return(sb.ToString()); }