function RenderRow() { global $conn, $Security, $ReportLanguage; // Set up summary values $colcnt = $this->ColCount; $this->SummaryCellAttrs =& ewr_InitArray($colcnt, NULL); $this->SummaryViewAttrs =& ewr_InitArray($colcnt, NULL); $this->SummaryLinkAttrs =& ewr_InitArray($colcnt, NULL); $this->SummaryCurrentValue =& ewr_InitArray($colcnt, NULL); $this->SummaryViewValue =& ewr_InitArray($colcnt, NULL); if ($this->RowTotalType == EWR_ROWTOTAL_GRAND) { // Grand total // Aggregate SQL $sSql = ewr_BuildReportSql(str_replace("<DistinctColumnFields>", $this->DistinctColumnFields, $this->getSqlSelectAgg()), $this->getSqlWhere(), $this->getSqlGroupByAgg(), "", "", $this->Filter, ""); $rsagg = $conn->Execute($sSql); if ($rsagg && !$rsagg->EOF) { $rsagg->MoveFirst(); } } for ($i = 1; $i <= $this->ColCount; $i++) { if ($this->Col[$i]->Visible) { if ($this->RowType == EWR_ROWTYPE_DETAIL) { // Detail row $thisval = $this->Val[$i]; } elseif ($this->RowTotalType == EWR_ROWTOTAL_GROUP) { // Group total $thisval = $this->Smry[$i][$this->RowGroupLevel]; } elseif ($this->RowTotalType == EWR_ROWTOTAL_PAGE) { // Page total $thisval = $this->Smry[$i][0]; } elseif ($this->RowTotalType == EWR_ROWTOTAL_GRAND) { // Grand total $thisval = $rsagg && !$rsagg->EOF ? $rsagg->fields[$i + 0 - 1] : 0; } $this->SummaryCurrentValue[$i - 1] = $thisval; } } if ($this->RowTotalType == EWR_ROWTOTAL_GRAND) { // Grand total if ($rsagg) { $rsagg->Close(); } } // Call Row_Rendering event $this->Row_Rendering(); // // Render view codes // if ($this->RowType == EWR_ROWTYPE_TOTAL) { // Summary row // invid $this->invid->GroupViewValue = $this->invid->GroupOldValue(); $this->invid->CellAttrs["class"] = $this->RowGroupLevel == 1 ? "ewRptGrpSummary1" : "ewRptGrpField1"; // Set up summary values $scvcnt = count($this->SummaryCurrentValue); for ($i = 0; $i < $scvcnt; $i++) { $this->SummaryViewValue[$i] = ewr_FormatNumber($this->SummaryCurrentValue[$i], $this->amount->DefaultDecimalPrecision, -1, 0, 0); $this->SummaryViewAttrs[$i]["style"] = ""; $this->SummaryCellAttrs[$i]["style"] = ""; $this->SummaryCellAttrs[$i]["class"] = $this->RowTotalType == EWR_ROWTOTAL_GROUP ? "ewRptGrpSummary" . $this->RowGroupLevel : ""; } // invid $this->invid->HrefValue = ""; } else { // invid $this->invid->GroupViewValue = $this->invid->GroupValue(); $this->invid->CellAttrs["class"] = "ewRptGrpField1"; if ($this->invid->GroupValue() == $this->invid->GroupOldValue() && !$this->ChkLvlBreak(1)) { $this->invid->GroupViewValue = " "; } // Set up summary values $scvcnt = count($this->SummaryCurrentValue); for ($i = 0; $i < $scvcnt; $i++) { $this->SummaryViewValue[$i] = ewr_FormatNumber($this->SummaryCurrentValue[$i], $this->amount->DefaultDecimalPrecision, -1, 0, 0); $this->SummaryViewAttrs[$i]["style"] = ""; $this->SummaryCellAttrs[$i]["style"] = ""; $this->SummaryCellAttrs[$i]["class"] = $this->RecCount % 2 != 1 ? "ewTableAltRow" : "ewTableRow"; } // invid $this->invid->HrefValue = ""; } // Call Cell_Rendered event if ($this->RowType == EWR_ROWTYPE_TOTAL) { // Summary row // invid $this->CurrentIndex = 0; // Current index $CurrentValue = $this->invid->GroupOldValue(); $ViewValue =& $this->invid->GroupViewValue; $ViewAttrs =& $this->invid->ViewAttrs; $CellAttrs =& $this->invid->CellAttrs; $HrefValue =& $this->invid->HrefValue; $LinkAttrs =& $this->invid->LinkAttrs; $this->Cell_Rendered($this->invid, $CurrentValue, $ViewValue, $ViewAttrs, $CellAttrs, $HrefValue, $LinkAttrs); for ($i = 0; $i < $scvcnt; $i++) { $this->CurrentIndex = $i; $CurrentValue = $this->SummaryCurrentValue[$i]; $ViewValue =& $this->SummaryViewValue[$i]; $ViewAttrs =& $this->SummaryViewAttrs[$i]; $CellAttrs =& $this->SummaryCellAttrs[$i]; $HrefValue = ""; $LinkAttrs =& $this->SummaryLinkAttrs[$i]; $this->Cell_Rendered($this->amount, $CurrentValue, $ViewValue, $ViewAttrs, $CellAttrs, $HrefValue, $LinkAttrs); } } else { // invid $this->CurrentIndex = 0; // Group index $CurrentValue = $this->invid->GroupValue(); $ViewValue =& $this->invid->GroupViewValue; $ViewAttrs =& $this->invid->ViewAttrs; $CellAttrs =& $this->invid->CellAttrs; $HrefValue =& $this->invid->HrefValue; $LinkAttrs =& $this->invid->LinkAttrs; $this->Cell_Rendered($this->invid, $CurrentValue, $ViewValue, $ViewAttrs, $CellAttrs, $HrefValue, $LinkAttrs); for ($i = 0; $i < $scvcnt; $i++) { $this->CurrentIndex = $i; $CurrentValue = $this->SummaryCurrentValue[$i]; $ViewValue =& $this->SummaryViewValue[$i]; $ViewAttrs =& $this->SummaryViewAttrs[$i]; $CellAttrs =& $this->SummaryCellAttrs[$i]; $HrefValue = ""; $LinkAttrs =& $this->SummaryLinkAttrs[$i]; $this->Cell_Rendered($this->amount, $CurrentValue, $ViewValue, $ViewAttrs, $CellAttrs, $HrefValue, $LinkAttrs); } } // Call Row_Rendered event $this->Row_Rendered(); $this->SetupFieldCount(); }
$Page->RowTotalType = EWR_ROWTOTAL_GRAND; $Page->RowTotalSubType = EWR_ROWTOTAL_FOOTER; $Page->RowAttrs["class"] = "ewRptGrandSummary"; $Page->RenderRow(); ?> <tr<?php echo $Page->RowAttributes(); ?> ><td colspan="<?php echo $Page->GrpFldCount + $Page->DtlFldCount; ?> "><?php echo $ReportLanguage->Phrase("RptGrandTotal"); ?> <span class="ewDirLtr">(<?php echo ewr_FormatNumber($Page->TotCount, 0, -2, -2, -2); echo $ReportLanguage->Phrase("RptDtlRec"); ?> )</span></td></tr> <?php $Page->ResetAttrs(); $Page->Job_Offered_Candidates->Count = $Page->GrandCnt[1]; $Page->Job_Offered_Candidates->SumValue = $Page->GrandSmry[1]; // Load SUM $Page->RowTotalSubType = EWR_ROWTOTAL_SUM; $Page->RowAttrs["class"] = "ewRptGrandSummary"; $Page->RenderRow(); ?> <tr<?php echo $Page->RowAttributes(); ?>