0
Good afternoon, I’m generating a report on PDF
and I need to generate a new page when changing user code
Is generating so
At the moment it is only inserting the line of the items and ignoring the order, it needs to mount the same as the ones above that are correct, creating in a new page a new header (Aspecto físico, habilidade motora e Inteligencia de jogo)
and inserting the items in their proper place.
PHP
for ($i=0; $i < count($area_avaliar); $i++) {
if ($area_avaliar_tecnica[$i]->descricao_tecnica != $area_avaliar_tecnica[$i-1]->descricao_tecnica) {
$this->pdf->Ln();
$this->pdf->SetFillColor(195, 195, 195);
$this->pdf->SetTextColor(0);
$this->pdf->SetDrawColor(51, 51, 51);
$this->pdf->SetLineWidth(0.3);
$this->pdf->SetFont('', 'B', 24);
$this->pdf->Multicell(175, 5, $area_avaliar_tecnica[$i]->descricao_tecnica, 1, 'L', 1);
}
$this->pdf->SetFillColor(255, 255, 255);
$this->pdf->SetTextColor(0);
$this->pdf->SetDrawColor(51, 51, 51);
$this->pdf->SetLineWidth(0.3);
$this->pdf->SetFont('', 'N', 12);
$this->pdf->Multicell(175, 5, $area_avaliar[$i]->desc_area_avaliar_item.' = '.$area_avaliar[$i]->avaliacao, 1, 'L', 1);
}
This report that I am generating is dynamic, at the moment I have 3 headers
(Aspecto físico, habilidade motora e Inteligencia de jogo)
and some items inside them, I need to go through the $area_avaliar
(variable that receives all data) and generate the 3 headers and their items, and each time you change the ID, create a new page. $this->pdf->AddPage();
but I don’t know how I can do this, since at the moment I have several items on $area_avaliar
and it’s hard to go through and print the way I need to.