setQuery("SELECT * FROM rsl WHERE rsl.id='$idrsl'"); $rsldet->execute(); ?> setQuery("SELECT * FROM material_rsl LEFT JOIN material_type ON material_rsl.material_id=material_type.idmaterial_type WHERE material_rsl.rsl_id='$idrsl' ORDER BY material_rsl.material_id"); $materialrsllist->execute(); ?> Image($uplogo,5,5,60); $this->SetFont('Arial','',7); //$this->Cell(0,-5,'nome',0,0,"R"); $this->Cell(-180,25,'Synoptic Table',0,0,"C"); // Line break $this->Ln(20); } // Page footer function Footer() { // Position at 1.5 cm from bottom $this->SetY(-15); // Arial italic 8 $this->SetFont('Helvetica','',8); // Page number $this->Cell(0,10,'TRL - Reportify.cloud - Page n.'.$this->PageNo().'/{nb}',0,0,'C'); } } // Instanciation of inherited class $pdf = new PDF('P','mm','A4'); $pdf->AliasNbPages(); $pdf->SetMargins(6, 6, 6); $pdf->SetAutoPageBreak(true, 8); $pdf->AddPage(); $pdf->SetFont('Helvetica','',12); $titlerslcomp = 'TRL' . html_entity_decode($rsldet->getColumnVal("name")) . '- Ver. ' . html_entity_decode($rsldet->getColumnVal("version")); $pdf->SetFont('Helvetica','',9); $pdf->SetFont('','B','14'); $pdf->Cell(198,6,$titlerslcomp,0,0,'C'); $pdf->Ln(); $pdf->SetFont('','',9); $pdf->SetFillColor(232, 242, 255); ?> atEnd()) { $wa_startindex = $materialrsllist->Index; ?> Ln(); $pdf->SetFont('','B','9'); $pdf->SetFillColor(252,237,210); $pdf->Cell(198,6,'Material/end use: ' . html_entity_decode($materialrsllist->getColumnVal("name_material"), ENT_QUOTES, 'UTF-8'),1,0,'C',TRUE); $pdf->Ln(); $pdf->Ln(); // search analysis loop $idmaterial=$materialrsllist->getColumnVal("material_id");?> setQuery("SELECT * FROM analysis_rsl LEFT JOIN analysis ON analysis_rsl.analysis_id=analysis.idanalysis LEFT JOIN methods ON analysis_rsl.idmethods=methods.idmethods WHERE analysis_rsl.rsl_id='$idrsl' AND analysis_rsl.material_id='$idmaterial' ORDER BY analysis_rsl.analysis_id"); $analysislistrsl->execute();?> atEnd()) { $wa_startindex = $analysislistrsl->Index; ?> getColumnVal("analysis_id"); $analysisnametitle='Analysis: '.$analysislistrsl->getColumnVal("name_analysis"); $pdf->SetFillColor(195,255,217); $pdf->SetFont('','B','10'); $pdf->Cell(198,6,$analysisnametitle,1,0,'L',TRUE); $pdf->Ln(); $pdf->SetFont('','I','8'); $pdf->SetFillColor(245,245,245); $methodsanalysisname = 'Method: ' . html_entity_decode($analysislistrsl->getColumnVal("methodsnumber"), ENT_QUOTES, 'UTF-8'); $pdf->Cell(198,6,$methodsanalysisname,1,0,'L',TRUE); $pdf->Ln(); ?> setQuery("SELECT * FROM analysis_component LEFT JOIN component ON analysis_component.idcomponent=component.idcomponent WHERE analysis_component.idanalysis='$idanalysis' AND analysis_component.idcompany='$idcompany' ORDER BY analysis_component.idanalysiscomponent"); $componentanalysislist->execute(); ?> getColumnVal("idcomponent");?> setQuery("SELECT * FROM requirement LEFT JOIN unit_measure ON unit_measure.id=requirement.unit_measure_id WHERE requirement.rsl_id='$idrsl' AND requirement.analysis_id='$idanalysis' AND requirement.component_id='$idcomponent'"); $reqlist->execute(); ?> SetFillColor(155,190,255); $pdf->SetFont('','B','8'); $pdf->Cell(15,6,'Code',1,0,'C',TRUE); $pdf->Cell(83,6,'Component',1,0,'C',TRUE); $pdf->Cell(20,6,'CAS',1,0,'C',TRUE); $pdf->Cell(20,6,'Lower Limit',1,0,'C',TRUE); $pdf->Cell(20,6,'Upper Limit',1,0,'C',TRUE); $pdf->Cell(20,6,'LOQ',1,0,'C',TRUE); $pdf->Cell(20,6,'UM',1,0,'C',TRUE); $pdf->Ln(); $wa_startindex = 0; while(!$componentanalysislist->atEnd()) { $wa_startindex = $componentanalysislist->Index; ?> SetFillColor(220,232,255); $pdf->SetFont('','B','8'); $pdf->Cell(15,6,html_entity_decode($componentanalysislist->getColumnVal("component_map"), ENT_QUOTES, 'UTF-8'),1,0,'L',TRUE); $pdf->Cell(83,6,html_entity_decode($componentanalysislist->getColumnVal("name_component"), ENT_QUOTES, 'UTF-8'),1,0,'L',TRUE); $pdf->Cell(20,6,html_entity_decode($componentanalysislist->getColumnVal("cas_component"), ENT_QUOTES, 'UTF-8'),1,0,'C',TRUE); $pdf->Cell(20,6,html_entity_decode($reqlist->getColumnVal("lowerlimit_requirements"), ENT_QUOTES, 'UTF-8'),1,0,'C',TRUE); $pdf->Cell(20,6,html_entity_decode($reqlist->getColumnVal("upper_limit_requirements"), ENT_QUOTES, 'UTF-8'),1,0,'C',TRUE); $pdf->Cell(20,6,html_entity_decode($reqlist->getColumnVal("loq_requirements"), ENT_QUOTES, 'UTF-8'),1,0,'C',TRUE); $pdf->Cell(20,6,html_entity_decode($reqlist->getColumnVal("name"), ENT_QUOTES, 'UTF-8'),1,0,'C',TRUE); $pdf->Ln(); ?> moveNext(); } $componentanalysislist->moveFirst(); //return RS to first record unset($wa_startindex); unset($wa_repeatcount); $pdf->SetFillColor(245,245,245); $pdf->SetFont('','','8'); $notevalue = 'Note: ' . html_entity_decode($analysislistrsl->getColumnVal("comment_anrsl"), ENT_QUOTES, 'UTF-8'); $pdf->Cell(198,6,$notevalue,1,0,'L',TRUE); $pdf->Ln(); $pdf->Ln(); ?> moveNext(); } $analysislistrsl->moveFirst(); //return RS to first record unset($wa_startindex); unset($wa_repeatcount); ?> moveNext(); } $materialrsllist->moveFirst(); //return RS to first record unset($wa_startindex); unset($wa_repeatcount); ?> getColumnVal("name").'- Ver. '.$rsldet->getColumnVal("version").'.pdf'; $filename=$filepathname; $pdf->Output($filename,'D'); ?>