Quebra de Página por Registros
Bom dia a todos.
Eu preciso de uma ajuda.
Tenho um cadastro de clientes e gostaria que houvesse uma quebra de página a cada 6 registros.
Segue o código:
<table width="972" border="0" align="center" cellpadding="2" cellspacing="2">
<tr>
<td width="301" class="style4"> </td>
<td width="627" align="right" class="style4"> </td>
</tr>
</table>
<table width="960" height="50" border="0" align="center" cellpadding="2" cellspacing="2">
<tr>
<td colspan="2">
<%
'--- Define o número de registros por página ---
Const TamanhoPagina = 1000
set rsQuery = Server.CreateObject( "ADODB.RecordSet" )
rsQuery.PageSize = TamanhoPagina
rsQuery.CacheSize = TamanhoPagina
rsQuery.CursorType = 3
'rsQuery.Open "select * from clientes order by cliente", Conn
rsQuery.Open "select * from clientes where status_cliente='A' order by cliente" , Conn
rsQuery.AbsolutePage = Session("PaginaAtual")
cod_cliente=rsQuery("cod_cliente")
%>
</td>
</tr>
<tr>
<td width="655" align="left" class="style9a"valign="bottom">Lista de Clientes Analítica</td>
<td width="300" align="right"><img src="images/logo_day_trip_pq.png" width="300" height="128"></td>
</tr>
<tr>
<td colspan="2"></td>
</tr>
<tr>
<td colspan="2"><img src="images/linha_cinza.png" width="960" height="10"></td>
</tr>
<tr>
<td colspan="2"><table width="960" border="0" cellpadding="0" cellspacing="0" id="content-box1">
<tr>
<td height="5" colspan="2" bgcolor="#accabc"> </td>
<td height="5" bgcolor="#accabc"> </td>
<td height="5" bgcolor="#accabc"> </td>
<td bgcolor="#accabc"> </td>
</tr>
<%
dim total
total = 0
item = 1
do while rsquery.eof them
cod_cliente=rsQuery("cod_cliente")
'valor = rsQuery("valor")
if isnumeric(valor) then
total = total + valor
end if
%>
<tr>
<td height="5" bgcolor="#accabc" class="style9" align="left"> Nome</td>
<td bgcolor="#accabc" class="style9" align="left"> RG</td>
<td bgcolor="#accabc" class="style9" align="center">Nascimento</td>
<td bgcolor="#accabc" class="style9" align="left"> Telefone</td>
<td width="140" bgcolor="#accabc" class="style9" align="left"> Celular</td>
.
.
.
.
<%
item = item + 1
if item = 6 then
response.write "<br style=""page-break-before: always"">"
item = 1
end ifrsQuery.Movenext
%>
<% loop %>
</tr>
</table>
Agradeço a todos antecipadamente.
Discussão (3)
Carregando comentários...