public function prepareBody($outputType) { $this->numRows = 0; $tblBody = "<tbody>"; while ($currentRow = $this->reportResult->fetchRowPersist(MYSQLI_ASSOC)) { if (isset($currentRow['platformID'])) { ReportNotes::addPlatform($currentRow['platformID']); } if (isset($currentRow['publisherPlatformID'])) { ReportNotes::addPublisher($currentRow['publisherPlatformID']); } $colnum = 1; $subtotal = 0; $rowOutput = "<tr class='data'>"; foreach (ReportTable::filterRow($currentRow) as $field => $value) { if ($this->performSubtotalFlag && isset($this->columnData['sum'][$field])) { // get the numbers out for summing if ($field === 'QUERY_TOTAL') { $value = $subtotal; } else { $subtotal += $value; } $this->totalSumArray[$field] += $value; } $rowOutput .= $this->formatColumn($outputType, $currentRow, $field, $value); // end if display columns is Y ++$colnum; } // end loop through columns $rowOutput .= "</tr>"; ++$this->numRows; if (!$this->report->onlySummary || $outputType !== 'web') { $tblBody .= $rowOutput; } } $tblBody .= "</tbody>"; return $tblBody; }