Ver Mensaje Individual
  #5 (permalink)  
Antiguo 04/10/2011, 15:54
Avatar de vanegasjd
vanegasjd
 
Fecha de Ingreso: octubre-2011
Ubicación: Armenia, Quindio
Mensajes: 20
Antigüedad: 12 años, 7 meses
Puntos: 0
Respuesta: Css en Zend Framework para reporte en Excel

TENGO EL MODELO: ///////////

<?php
/**
* reportesModel
*
* @author Vanegas-SENA
* @version
*/
require_once 'Zend/Db/Table/Abstract.php';
class reportesModel extends Zend_Db_Table_Abstract
{
/**
* The default table name
*/
protected $_name = 'proveedores';

public function actualizar()
{
$select = $this->select();
$select->order('nombre');
return $this->fetchAll($select);
}
}


ESTA ES LA VISTA://///////

<?php
header("Pragma: public");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: pre-check=0, post-check=0, max-age=0");
header("Pragma: no-cache");
header("Expires: 0");
header("Content-Transfer-Encoding: none");
header("Content-Type: application/vnd.ms-excel;");
header("Content-type: application/x-msexcel");
header("Content-Disposition: attachment; filename=report2_opendebitsummary".date('Ymd').".x ls");


?>
<html>
<body>
<table border="1">
<tr>
<td>Nombre</td>
<td>Descripcion</td>

</tr>
<?php foreach($this->proveedores as $order):?>
<tr>
<td><?php echo $this->escape($order -> nombre);?></td>
<td><?php echo $this->escape($order -> descripcion);?></td>
</tr>
<?php endforeach;?>
</table>
</body>
</html>


Y EL CONTROLADOR:

<?php
/**
* reportesController
*
* @author
* @version
*/
require_once 'Zend/Controller/Action.php';
class reportesController extends Zend_Controller_Action
{
/**
* The default action - show the home page
*/
public function indexAction ()
{

}

public function reportesAction(){
//llamo a mi modelo
$order = new reportesModel();
$this->view->proveedores=$order->actualizar();


}
}

LO HAGO CON ESTE SCRIPT PERO ME SALE ALGO SIMPLE ASI:


|nombre|telefono|direccion |
|lalala |44444 | mm 43 casa 1 |
|juju | 12121 | kj 12 num 23 |





y lo que desearia CLARO QUE ALGO MAS BONITO

REPORTE DE PROVEEDORES

|nombre|telefono|direccion |
|lalala |44444 | mm 43 casa 1 |
|juju | 12121 | kj 12 num 23 |

FECHA:0000/00/00 [COLOR="rgb(46, 139, 87)"]HORA[/COLOR]:00:00