Exportar a pdf con mpdf

Saludos a todos en el foro, estoy utilizando mpdf con ePdf, para hacer reportes en pdf, el problema es que he utilizado para generar un reporte con los resultados de una tabla por ejemplo:

En el controlador se observa que la consulta nos muestra los valores de la tabla productos




public function actionGenerarPdf() {

    	$session = new CHttpSession;

    	$session->open();

    	if (isset($session['productos_records'])) {

        	$model = $session['productos_records'];

    	} else {

        	$model = Productos::model()->findAll();//consulta para buscar la informacion

    	}

    	$mPDF1 = Yii::app()->ePdf->mpdf('utf-8', 'Letter', '', '', 15, 15, 35, 25, 9, 9, 'P'); //Esto lo pueden configurar como quieren, para eso deben de entrar en la web de MPDF para ver todo lo que permite.

    	$mPDF1->useOnlyCoreFonts = true;

    	$mPDF1->SetTitle("Texto necesario - Reporte");

    	$mPDF1->SetAuthor("Texto necesario");

    	$mPDF1->SetWatermarkText("Texto necesario");

    	$mPDF1->showWatermarkText = true;

    	$mPDF1->watermark_font = 'DejaVuSansCondensed';

    	$mPDF1->watermarkTextAlpha = 0.1;

    	$mPDF1->SetDisplayMode('fullpage');

    	$mPDF1->WriteHTML($this->renderPartial('pdfReport', array('model' => $model), true));

    	$mPDF1->Output('Reporte_Productos' . date('YmdHis'), 'I');

    	exit;

	}



al generar una forma para crear el reporte nos muestra los resultados de esa consulta segun lo necesitamos




<?php

$contador = count($model);

if ($model !== null):

	?>

	<html>

    	<head>

        	<style>

            	body {font-family: sans-serif;

                  	font-size: 10pt;

            	}

            	p { margin: 0pt;

            	}

            	td { vertical-align: top; }

            	.items td {

                	border-left: 0.1mm solid #000000;

                	border-right: 0.1mm solid #000000;

            	}

            	table thead td { background-color: #EEEEEE;

                     			text-align: center;

                     			border: 0.1mm solid #000000;

            	}

            	.items td.blanktotal {

                	background-color: #FFFFFF;

                	border: 0mm none #000000;

                	border-top: 0.1mm solid #000000;

            	}

            	.items td.totals {

                	text-align: right;

                	border: 0.1mm solid #000000;

            	}

        	</style>

    	</head>

    	<body>


        	<!--mpdf

 			<htmlpageheader name="myheader">

 			<table width="100%"><tr>

 			<td width="50%" style="color:#0000BB;"><span style="font-weight: bold; font-size: 14pt;">Empresa Productos Lácteos Bayamo</span><br />Bayamo Granma<br /><span style="font-size: 15pt;">☎</span> (5323) 441203</td>

 			<td width="50%" style="text-align: right;"><b>Listado de Productos</b></td>

 			</tr></table>

 			</htmlpageheader>

 			

        	<htmlpagefooter name="myfooter">

 			<div style="border-top: 1px solid #000000; font-size: 9pt; text-align: center; padding-top: 3mm; ">

 			Página {PAGENO} de {nb}

 			</div>

 			</htmlpagefooter>

 			

        	<sethtmlpageheader name="myheader" value="on" show-this-page="1" />

 			<sethtmlpagefooter name="myfooter" value="on" />

 			mpdf-->

        	<div style="text-align: right"><b>Fecha: </b><?php echo date("d/m/Y"); ?> </div>

        	<b>Total Resultados:</b> <?php echo $contador; ?>

        	<table class="items" width="100%" style="font-size: 11pt; border-collapse: collapse;" cellpadding="5">

            	<thead>

                	<tr>

                    	<td width="16.666666666667%">Código</td>

                    	<td width="6.666666666667%">Código Sub</td>

                    	<td width="66.666666666667%">Nombre</td>

                    	<td width="6.666666666667%">Precio MN</td>

                    	<td width="6.666666666667%">Precio CUC</td>

                    	<td width="6.666666666667%">Destino</td>

                    	<td width="6.666666666667%">UM</td>

                	</tr>

            	</thead>

            	<tbody>

                	<!-- ITEMS -->

                	<?php 

         			

                	foreach ($model as $row): ?>

                    	<tr>

                        	<td align="center">

                            	<?php echo $row->Codprod; ?>

                        	</td>

                        	<td align="center">

                            	<?php echo $row->CodSubp; ?>

                        	</td>

                        	<td align="left">

                            	<?php echo $row->NProductos; ?>

                        	</td>

                        	<td align="center">

                            	<?php echo $row->PreMay; ?>

                        	</td>

                        	<td align="center">

                            	<?php echo $row->PrCUC; ?>

                        	</td>

                        	<td align="center">

                            	<?php echo $row->Codde; ?>                 			

                        	</td>

                        	<td align="center">

                            	<?php echo $row->UM; ?>

                        	</td>

                    	</tr>

                	<?php endforeach; ?>

                	<!-- FIN ITEMS -->

                	<tr>

                    	<td class="blanktotal" colspan="7" rowspan="7"></td>

                	</tr>

            	</tbody>

        	</table>

    	</body>

	</html>

<?php endif; ?>



Yo lo necesito con una consulta donde intervengan mas de una tabla, ejemplo para hacer el reporte de una factura donde los datos estan en mas de una tabla, la tabla factura y la tabla detalles de fatura, asi como cualquier otra tabla que muestre datos de la factura. Necesito saber como puedo hacer para mostrar los resultados de una consulta asi en el reporte.