Saludos a todos los foristas. 
 
La siguiente es para preguntar como puedo hacer para cargar datos extraidos de la siguiente consulta de una base de datos en mysql
 
$pegar= "SELECT COUNT(acta) as cantidad, tipo_tramite FROM tramite  WHERE fecha_tramite='$fecha_bus' GROUP BY tipo_tramite ";
 
$cad = mysql_db_query($base,$pegar) or die (mysql_error());
 
Llenar con la siguiente funcion que está en la clase FPDF
 
//Cargar los datos
function LoadData($file)
{
	//Leer las líneas del fichero
	$lines=file($file);
	$data=array();
	foreach($lines as $line)
		$data[]=explode(';',chop($line));
	return $data;
}
 
Y luego imprimirlos en una tabla FancyTable, que se encuentra en la misma clase..
 
//Tabla coloreada
function FancyTable($header,$data)
{
	//Colores, ancho de línea y fuente en negrita
	$this->SetFillColor(255,0,0);
	$this->SetTextColor(255);
	$this->SetDrawColor(128,0,0);
	$this->SetLineWidth(.3);
	$this->SetFont('','B');
	//Cabecera
	$w=array(40,35,40,45);
	for($i=0;$i<count($header);$i++)
		$this->Cell($w[$i],7,$header[$i],1,0,'C',1);
	$this->Ln();
	//Restauración de colores y fuentes
	$this->SetFillColor(224,235,255);
	$this->SetTextColor(0);
	$this->SetFont('');
	//Datos
	$fill=0;
	foreach($data as $row)
	{
		$this->Cell($w[0],6,$row[0],'LR',0,'L',$fill);
		$this->Cell($w[1],6,$row[1],'LR',0,'L',$fill);
		$this->Cell($w[2],6,number_format($row[2]),'LR',0,'R',$fill);
		$this->Cell($w[3],6,number_format($row[3]),'LR',0,'R',$fill);
		$this->Ln();
		$fill=!$fill;
	}
	$this->Cell(array_sum($w),0,'','T');
}
 
Sin mas que agregar y agradeciendo de antemano..muchas gracias por su ayuda..Saludos 
  
 

