Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/03/2012, 20:05
claudio_hbl
 
Fecha de Ingreso: octubre-2006
Ubicación: Valparaiso Chile
Mensajes: 228
Antigüedad: 17 años, 6 meses
Puntos: 0
ezpdf solo imprime los trazados de la tabla y no los datos

Hola que tal.

Estoy utilizando la clase ezpdf, para generar reportes de bases de datos, pero solo me imprime el trazado de la tabla pero vacía sin datos.

Este código estoy utilizando:
Código PHP:
Ver original
  1. <?php
  2. require_once '../clases/conexion.class.php';
  3. require_once '../clases/class.ezpdf.php';
  4. ?><pre><?php
  5. //print_r(get_required_files());
  6. ?></pre><?php
  7. $pdf =& new Cezpdf('a4');
  8. $pdf->selectFont('../fonts/courier.afm');
  9. $pdf->ezSetCmMargins(1,1,1.5,1.5);
  10.  
  11. $queEmp = "SELECT rut_empresa,razon_social,domicilio,ciudad,comuna,pais,giro,estado
  12.        FROM spc_datos_factura WHERE estado = 2 ";
  13. $resEmp = mysql_query($queEmp, Conectar::con()) or die(mysql_error());
  14. $totEmp = mysql_num_rows($resEmp);
  15.  
  16. $ixx = 0;
  17. while($datatmp = mysql_fetch_assoc($resEmp)) {
  18.     $ixx = $ixx+1;
  19.     $data[] = array_merge($datatmp, array('num'=>$ixx));
  20. }
  21. $titles = array(
  22.                 'num'=>'<b>Num</b>',
  23.                 'rut_empresa'=>'<b>Rut</b>',
  24.                 'razon_social'=>'<b>Razón Social</b>',
  25.                 'domicilio'=>'<b>Domicilio</b>',
  26.                 'ciudad'=>'<b>Ciudad</b>',
  27.                 'comuna'=>'<b>Comuna</b>',
  28.                 'pais'=>'<b>País</b>',
  29.                 'giro'=>'<b>Giro</b>'
  30.             );
  31. $options = array(
  32.                 'shadeCol'=>array(0.9,0.9,0.9),
  33.                 'xOrientation'=>'center',
  34.                 'width'=>500
  35.             );
  36. $txttit = "<b>Listado Clientes </b>\n";
  37. $txttit.= "Pendientes de Facturar \n";
  38.  
  39. $pdf->ezText($txttit, 12);
  40. $pdf->ezTable($data, $titles, '', $options);
  41. $pdf->ezText("\n\n\n", 10);
  42. $pdf->ezText("<b>Fecha:</b> ".date("d/m/Y"), 10);
  43. $pdf->ezText("<b>Hora:</b> ".date("H:i:s")."\n\n", 10);
  44. $pdf->ezStream();
  45. ?>

Por favor, cualquier ayuda es bienvenida, he probado varias clases pero ninguna me ha resultado, siguiendo ejemplos y modificandolos, quizás no he comprendido bien algunas cosas.

Un Cordial Saludo
__________________
Un Cordial Saludo
Claudio González Soto
Negocios Online
http;//www.servpcweb.com