<?
    class repDOMPDF4 extends MDOMPDFReport
    {
        public function createFields()
        {
            $aluno = $this->manager->getBusiness('example','aluno');
            $query = $aluno->listAll();
            foreach($query->result as $row)
            {
                $s1 = new MSpan('',$row[1]);
                $s1->fontFamily = 'Verdana'; 
                $r = new MDiv('', $s1);
                $r->backgroundColor = ($i++)%2 ? '#CCC' : '#FFF';
                $r->width = '80%';
                $r->addStyle('margin-left','auto');
                $r->addStyle('margin-right','auto');
                $fields[] = $r;
            }
            $this->setFields($fields); 
        }
    }
?>
