Good afternoon, I am generating a report in PDF
and I need to generate a new page when I change the user code
It is thus generating
At the moment he is only inserting the line of the items and ignoring the order, he has to mount the same ones 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 its place. / p>
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 I'm generating is dynamic, I currently have 3 headers
(Aspecto físico, habilidade motora e Inteligencia de jogo)
and some items inside them, I need to go through $area_avaliar
(variable that receives all data) and generate the 3 headers and their items, and every time I change the ID, create a new page. $this->pdf->AddPage();
but I do not know how I can do this, since I currently have several items in $area_avaliar
and it is difficult to scroll and print the way I need it.