Main Menu

This category contains 1 post

Mencetak Laporan dengan mprint in Yii Framework

mprint sebuah ekstensi di Yii Framework yang dibuat oleh, ekstensi ini bisa di download di atau
setelah di download, ekstrak di bawah direktori protected/extension/
setelah di ekstrak langkah terakhir adalah buat file di view/nama-modelnya/laporan.php


Yii::app()->clientScript->registerScript(‘search’, ”
return false;
$(‘.search-form form’).submit(function(){
$.fn.yiiGridView.update(‘hunian-grid’, {
data: $(this).serialize()
return false;

<h1>Laporan Hunian</h1>

$this->widget(‘ext.mPrint.mPrint’, array(
‘title’ => ‘Laporan Hunian’,          //the title of the document. Defaults to the HTML title
‘tooltip’ => ‘Print’,        //tooltip message of the print icon. Defaults to ‘print’
‘text’ => ‘Print Hunian’,   //text which will appear beside the print icon. Defaults to NULL
‘element’ => ‘#page’,        //the element to be printed.
‘exceptions’ => array(       //the element/s which will be ignored
‘publishCss’ => true,       //publish the CSS for the whole page?
//’visible’ => Yii::app()->user->checkAccess(‘print’),  //should this be visible to the current user?
// ‘alt’ => ‘print’,       //text which will appear if image can’t be loaded
// ‘debug’ => true,            //enable the debugger to see what you will get
‘id’ => ‘print-div’         //id of the print link
—–isi sesuai dengan grid anda—–