Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/03/2014, 06:30
Avatar de letingel
letingel
 
Fecha de Ingreso: noviembre-2013
Ubicación: neiva
Mensajes: 41
Antigüedad: 10 años, 6 meses
Puntos: 0
Pregunta variables fpdf en php y mysql

Buenos días.

Estoy trabajando con las librerías del fdpf para php, elaborando unas tablas con datos extraídos de una consulta sql, pero la parecer algo no estoy haciendo bien ya que no me imprime los datos dentro de las celdas, ya probe y por fuera si imprime.

Si alguien tiene alguna sugerencia lo agradezco.

Aqui el link para ver el pdf

http://www.ctrlobra.letingel.com/usu....php?id_item=1

Aqui el codigo:

Código PHP:
<?php
include('../../conexion.php');
include(
'fpdf/fpdf.php');
//Variables para consulta
$id_salidas $_GET['id_item'];
//Consulta sql encabezado
$query1 mysql_query("SELECT * FROM salida_ingreso WHERE id_salida_ingreso = '$id_salidas'");
$encabezado mysql_fetch_array($query1);
//Consulta para cuerpo tabla
$query2 mysql_query("SELECT * FROM items_2 WHERE id_acta = '$id_salidas'");
$cuerpo mysql_fetch_array($query2);
//Variables para celdas
   
$destino $encabezado['destino'];
   
$tipo $encabezado['tipo_solicitud'];
   
$fecha $encabezado['fecha2'];
   
$id $encabezado['id_salida_ingreso'];
header("Content-Type: text/html; charset=iso-8859-1 ");
class 
PDF extends FPDF
{
   
//Columna actual
   
var $col=0;
   
//Ordenada de comienzo de la columna
   
var $y=0;
   
//Cabecera de página
function Header()
{
//Logo
$this->Image("images/logo.jpg",12,11,35,19,"JPG");
//Arial bold 15
$this->SetFont('Arial','',12);
//Encabezado
$this->Cell(40,20,'',1,0,'r');
$this->Cell(80,10,'Sistema Integrado de Gestion',1,0,'C');
$this->Cell(30,5,'Vigencia',1,0,'C');
$this->Cell(40,5,'Mayo 1 de 2013',1,0,'C');
$this->Ln(5);
$this->Cell(120);
$this->Cell(30,5,'Pagina',1,0,'C');
$this->Cell(40,5,'1 de 1',1,0,'C');
$this->Ln(5);
$this->Cell(40);
$this->Cell(80,10,'Salida e ingreso de almacen',1,0,'C');
$this->Cell(30,5,'Codigo',1,0,'C');
$this->Cell(40,5,'GANA-RE-002',1,0,'C');
$this->Ln(5);
$this->Cell(120);
$this->Cell(30,5,'Version',1,0,'C');
$this->Cell(40,5,'001',1,0,'C');
//Contenido del formulario
$this->Ln(8);
$this->SetFont('Arial','',12);
$this->SetFillColor(200,220,255);
$this->Cell(25,5,'Uso/destino:',0,0,'C');
$this->Cell(50,5,$destino,1,0,'C');
$this->Cell(8,5,'',0,0,'C');
$this->Cell(10,5,'Tipo:',0,0,'C');
$this->Cell(30,5,$tipo,1,0,'C');
$this->Cell(6,5,'',0,0,'C');
$this->Cell(12,5,'fecha:',0,0,'C');
$this->Cell(25,5,$fecha,1,0,'C');
$this->Cell(7,5,'',0,0,'C');
$this->Cell(7,5,'No:',0,0,'C');
$this->Cell(10,5,$id,1,0,'C');
$this->Ln(8);
//Encabezado de la tabla
$this->SetFont('Arial','',10);
$this->SetFillColor(200,220,255);
$this->Cell(15,5,'ITEM',1,0,'C','T');
$this->Cell(60,5,'DESCRIPCION',1,0,'C','T');
$this->Cell(20,5,'UNIDAD',1,0,'C','T');
$this->Cell(15,5,'CANT.',1,0,'C','T');
$this->Cell(27,5,'ESTADO',1,0,'C','T');
$this->Cell(53,5,'OBSERVACIONES',1,0,'C','T');
//celdas de la tabla
$this->Ln();
$this->SetFont('Arial','',10);
$this->SetFillColor(200,220,255);
$this->Cell(15,5,'',1,0,'C');
$this->Cell(60,5,'',1,0,'C');
$this->Cell(20,5,'',1,0,'C');
$this->Cell(15,5,'',1,0,'C');
$this->Cell(27,5,'',1,0,'C');
$this->Cell(53,5,'',1,0,'C');
}
//Pie de página
function Footer()
{
//Posición
$this->SetY(-27);
//Fuente
$this->SetFont('Arial','',10);
//Número de página
$this->Cell(95,9,'ENTREGO',1,0,'C');
$this->Cell(95,9,'RECIBIO',1,0,'C');
$this->Ln();
$this->Cell(20,5,'NOMBRE',1,0,'C');
$this->Cell(75,5,'',1,0,'C');
$this->Cell(20,5,'NOMBRE',1,0,'C');
$this->Cell(75,5,'',1,0,'C');
$this->Ln();
$this->Cell(20,5,'CARGO',1,0,'C');
$this->Cell(75,5,'',1,0,'C');
$this->Cell(20,5,'CARGO',1,0,'C');
$this->Cell(75,5,'',1,0,'C');
$this->Ln();
$this->Cell(20,5,'FIRMA',1,0,'C');
$this->Cell(75,5,'',1,0,'C');
$this->Cell(20,5,'FIRMA',1,0,'C');
$this->Cell(75,5,'',1,0,'C');
}
}
//Impresion 
$pdf=new PDF();
$pdf->SetY(65);
$pdf->Output();
?>
Gracias.