Click to See Complete Forum and Search --> : Table data is not dispalyed properly on the web page


shanuragu
12-06-2003, 12:49 AM
Hi

I am displaying a set of values on a web page dynamically.
All records are displaying fine on the page only for the last record part of the table data is missing (just a hard coded data which is repeating for all tables). What could be the reason???

Please help
:confused:

PeOfEo
12-06-2003, 01:32 AM
post a link and some code. Cant see whats happening if we dont know whats going on.

shanuragu
12-06-2003, 04:06 AM
Here is the code

<%
Dim lInvoiceAmt, lTotalOutstanding
If rsPendingBills.RecordCount > 0 Then
While Not rsPendingBills.EOF
Response.write rsPendingBills.EOF
lInvoiceAmt = Round(CDbl(rsPendingBills("invoice_amt")) + CDbl(rsPendingBills("tax_amt")))
%>
<table width="650px" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" align="center">
<tr>
<td width="100%" align="center" valign="top">
<!-- Main Content STARTS HERE -->
<table bgcolor="#FFFFFF" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" align="center" valign="top" style="padding-left:2px">
<div>
<table class="tableCustom" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" align="left">&nbsp;</td>
</tr>
<tr>
<td width="100%" align="center" valign="top" style="padding-left:2px">
<!--Tab4-->
<table width="90%" border="0" cellpadding="0" cellspacing="0" style="padding-left:2px">
<tr>
<td colspan="2" width="100%" align="left">&nbsp;</td>
</tr>
<tr>
<td width="50%" align="left"><image src="../images/abm_logo1.gif" name="apt_image"></td>
<td width="50%" align="right"><font class="shnText"><b>Asia Broadband Media (India) Pvt. Ltd.</b><br>Shop #10, <%=rsApt("apt_nm")%>, Bangalore<br>Tel : <%=rsApt("ph")%><br>E-Mail : <%=rsApt("email")%></font></td>
</tr>
<tr>
<td width="100%" colspan="2" align="center"><hr color="#000000"></td>
</tr>
<tr>
<td colspan="2" width="100%" align="left">&nbsp;</td>
</tr>
<tr>
<td colspan="2" width="100%" align="center"><font class="shnText10"><b>BILL</b></font></td>
</tr>
<tr>
<td colspan="2" width="100%" align="left">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" align="center">
<table width="90%" border="0" cellpadding="2" cellspacing="2">
<tr>
<td width="25%" align="left" valign="top"><font class="shnText"><b>Billed To </b></font></td>
<td width="75%" align="left"><font class="shnText"><%=rsPendingBills("user_nm")%><br><%=rsPendingBills("flat_no")%></font></td>
</tr>
<tr>
<td width="25%" align="left"><font class="shnText"><b>Customer Code </b></font></td>
<td width="75%" align="left"><font class="shnText"><%=rsPendingBills("user_code")%></font></td>
</tr>
<tr>
<td width="25%" align="left"><font class="shnText"><b>Invoice Number </b></font></td>
<td width="75%" align="left"><font class="shnText"><%=Session("bill_prefix")%><%=objUtils.FormatString(CStr(rsPendingBills("invoice_no")), "##0000")%></font></td>
</tr>
<tr>
<td width="25%" align="left"><font class="shnText"><b>Invoice Date </b></font></td>
<td width="75%" align="left"><font class="shnText"><%=objUtils.FormatString(CStr(rsPendingBills("invoice_dt")), "mmmm dd yyyy")%></font></td>
</tr>
<tr>
<td width="25%" align="left"><font class="shnText"><b>Billed for Period </b></font></td>
<%
If rsPendingBills("invoice_tp") = "M" Then
%>
<td width="75%" align="left"><font class="shnText"><%=objUtils.FormatString(CStr(rsPendingBills("billed_from_dt")), "mmmm dd yyyy")%> to <%=objUtils.FormatString(CStr(rsPendingBills("billed_to_dt")), "mmmm dd yyyy")%></font></td>
<%
Else
%>
<td width="75%" align="left"><font class="shnText"><%=objUtils.FormatString(CStr(rsPendingBills("invoice_dt")), "mmmm dd yyyy")%> to <%=objUtils.FormatString(CStr(DateAdd("m", 1, rsPendingBills("invoice_dt"))), "mmmm dd yyyy")%></font></td>
<%
End if
%>
</tr>
<tr>
<td width="25%" align="left"><font class="shnText"><b>Due Date </b></font></td>
<td width="75%" align="left"><font class="shnText"><%=objUtils.FormatString(CStr(rsPendingBills("due_dt")), "mmmm dd yyyy")%></font></td>
</tr>
<tr>
<td width="25%" align="left"><font class="shnText"><b>Invoice Amount </b></font></td>
<td width="75%" align="left"><font class="stepText"><b>Rs <%=objUtils.FormatString(CStr(lInvoiceAmt), "#,##,##0.00")%></b></font></td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td width="100%" align="left" colspan="2">
<table width="90%" border="0" cellpadding="2" cellspacing="2">
<tr>
<td width="75%" bgcolor="#dadada"><font class="shnText"><b>Item Description</b></font></td>
<td width="25%" align="right" style="padding-right:10px" bgcolor="#dadada"><font class="shnText"><b>Total Amount</b></font></td>
</tr>
<% Dim rsDetails, rsCredits, lTaxAmt, lCreditAmt, lTotalPayableAmt, lInvoiceAmt1
Set rsDetails = objBilling.GetInvoiceDescriptions(CStr(rsPendingBills("invoice_id")))
Set rsCredits = objBilling.GetInvoiceCredits(CStr(rsPendingBills("invoice_id")))

While Not rsDetails.Eof
lInvoiceAmt1 = lInvoiceAmt1 + CDbl(rsDetails("invoice_amt"))
rsDetails.MoveNext
Wend

lCreditAmt = 0
While Not rsCredits.Eof
lCreditAmt = lCreditAmt + CDbl(rsCredits("credit_amt"))
rsCredits.MoveNext
Wend

lTaxAmt = Round(rsPendingBills("tax_amt"))

rsDetails.MoveFirst
While Not rsDetails.Eof
lInvoiceAmt1 = 0
lInvoiceAmt1 = lInvoiceAmt1 + CDbl(rsDetails("invoice_amt"))
%>
<tr>
<td width="75%"><font class="shnText"><%=rsDetails("invoice_desc")%></font></td>
<td width="25%" align="right" style="padding-right:10px"><font class="shnText"><%=objUtils.FormatString(CStr(rsDetails("invoice_amt")), "##,##0.00")%></font></td>
</tr>
<%
rsDetails.MoveNext
Wend

If CDbl(lCreditAmt) > 0 Then
%>
<tr>
<td width="75%"><font class="shnText"><a href="javascript:showCredits(<%=rsInvoice("invoice_id")%>, '<%=rsInvoice("invoice_no")%>')">Total Credits</a></font></td>
<td width="25%" align="right" style="padding-right:10px"><font class="shnText"><%=objUtils.FormatString(CStr(lCreditAmt), "-##,##0.00")%></font></td>
</tr>
<%
Else
%>
<tr>
<td width="75%"><font class="shnText">Total Credits</font></td>
<td width="25%" align="right" style="padding-right:10px"><font class="shnText">0.00</font></td>
</tr>
<%
End if
lTotalPayableAmt = (CDbl(lInvoiceAmt1) + CDbl(lTaxAmt)) - (CDBl(lCreditAmt) + CDBl(rsPendingBills("discount_amt")))
%>
<tr>
<td width="100%" colspan="2"><hr noshade style="height:1px"></td>
</tr>
<tr>
<td width="75%" align="right"><font class="shnText">Sub Total</font></td>
<td width="25%" align="right" style="padding-right:10px"><font class="shnText"><%=objUtils.FormatString(CStr(CDbl(lInvoiceAmt1) - CDbl(CStr(lCreditAmt))), "#,##,##0.00")%></font></td>
</tr>
<tr>
<td width="75%" align="right"><font class="shnText">Service Tax (@8%)</font></td>
<td width="25%" align="right" style="padding-right:10px"><font class="shnText"><%=objUtils.FormatString(CStr((lTaxAmt)), "##,##0.00")%></font></td>
</tr>
<tr>
<td width="100%" colspan="2"><hr noshade style="height:1px"></td>
</tr>
<tr>
<td width="75%" align="right"><font class="shnText"><b>Total Payable</b></font></td>
<td width="25%" align="right" style="padding-right:10px"><font class="stepText"><b>Rs <%=objUtils.FormatString(CStr(lTotalPayableAmt), "#,##,##0.00")%></b></font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" width="100%" >
<table width="90%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="50%" class="border_1">
<table width="100%" height="152" cellpadding="0" cellspacing="0"> Comment here
</table>
</td>
<td width="50%" class="border_1">
<table width="100%" height="152" cellpadding="0" cellspacing="0">Comment here
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<%
rsPendingBills.MoveNext
Wend
End if
%>
</td>
</tr>
</table>
</td>
</tr>
</table>


I am using pagebreak , is it creating any problem??? Is there any lmit for a web page to display data. Right now I am displaying 32 records on the web page.


shara

shanuragu
12-06-2003, 06:12 AM
Thanks for all ur help, I managed to get through the problem:D
Shara

PeOfEo
12-06-2003, 11:06 AM
heh ok.