Ver Mensaje Individual
  #5 (permalink)  
Antiguo 07/02/2012, 14:12
Avatar de 8461277
8461277
 
Fecha de Ingreso: diciembre-2002
Ubicación: san juan de los morros
Mensajes: 887
Antigüedad: 21 años, 5 meses
Puntos: 1
Respuesta: Primera fila, repetir en todas las hojas????

Cita:
Iniciado por ZiTAL Ver Mensaje
¿lo dices por la salida por impresora o por pantalla?

lo de la impresora lo tendrás muy dificil por no decir imposible, tendrás que calcular cuantas entradas entrar en cada hoja y hacer algo así:

entradas_por_hoja = 30
if(total_entradas%entradas_por_hoja==0)
// imprime cabecera
GRACIAS ZITAL POR TRATAR DE ORIENTARME, PRECISAMENTE ESE ALGORITMO LO APLICO PARA CALCULAR EL SUBTOTAL POR HOJA, SI OBSERVASTE EL CODIGO DE MI FUNCION, VERAZ ESTA PARTE:
Código PHP:
if (($numLinea 51) == 0) {  
           
$fecha=$datofecha['Fechadeposito']['fecha'];
           
$tablaHTML .= '<tr><td ></td><td></td><td></td><td style="width:155;"><b>SUBTOTAL='.number_format($totdep,2,',''.').' Bs.</b></td></tr>';
           
$totdep=0;
           }
//if($fecha != $datofecha['Fechadeposito']['fecha'])
                    
       
        
}//fin del primer foreach foreach($datosFecha as $datofecha )
        
if($totdep<0) {
            
$tablaHTML .= '<tr><td></td><td></td><td></td><td><b>SUBTOTAL='.number_format($totdep,2,',''.').' Bs.<b></td></tr>';
        }
        if(
$totdep2>0) {
            
$tablaHTML .='<tr><td></td><td></td><td></td><td style="width:155;"><b>TOTAL='.number_format($totdep2,2,',''.').' Bs.</b></td></tr>';
        }
        
$tablaHTML .= '</table>'
POR CADA HOJA EN LA FILA NUMERO 51 EL IMPRIME EL SUBTOTAL, Y CUANDO LLEGA A LA FILA FINAL (ULTIMO REGISTRO) IMPRIME EL GRAN TOTAL

TU RECOMENDACIÓN SERIA TOMAR ESE MISMA ESTRUCTURA DE ALGORITMO Y APLICASERLO A LA CABE3ZERA????
Código PHP:
$tablaHTML '<table style="text-align: center; width: 460px; " border="1" cellspacing="0" cellpadding="0">
                              <tr>
                                  <td style=" text-align: center; width:50;">Nº</td>
                                   <td style=" text-align: center;">Fecha Deposito</td>
                                  <td style=" text-align: center;">Vaucher / Monto</td>
                                  <td style=" text-align: center; width:220;">Banco</td>
                            </tr>'


SI TU RESPUESTA ES SI, COMO LO APPLICO, ASI:
$numLinea++;
entradas_por_hoja = 51
if($numLinea++;%entradas_por_hoja==0)
// imprime cabecera
$tablaHTML = '<table style="text-align: center; width: 460px; " border="1" cellspacing="0" cellpadding="0">
<tr>
<td style=" text-align: center; width:50;">Nº</td>
<td style=" text-align: center;">Fecha Deposito</td>
<td style=" text-align: center;">Vaucher / Monto</td>
<td style=" text-align: center; width:220;">Banco</td>
</tr>';
?????? pd, y SI ES SALIDA POR IMPRESORA, YA QUE EL REPORTE LO GENERO A PDF
__________________
Miguel Padrón :cool: