function RenderRow()
 {
     global $conn, $Security, $ReportLanguage;
     // Set up summary values
     $colcnt = $this->ColCount + 1;
     $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);
     $rowsmry = 0;
     $rowcnt = 0;
     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 + 1 - 1] : 0;
             }
             $this->SummaryCurrentValue[$i - 1] = $thisval;
             $rowsmry = ewr_SummaryValue($rowsmry, $thisval, $this->getSummaryType());
         }
     }
     if ($this->RowTotalType == EWR_ROWTOTAL_GRAND) {
         // Grand total
         if ($rsagg) {
             $rsagg->Close();
         }
     }
     $this->SummaryCurrentValue[$this->ColCount] = $rowsmry;
     // Call Row_Rendering event
     $this->Row_Rendering();
     //
     //  Render view codes
     //
     if ($this->RowType == EWR_ROWTYPE_TOTAL) {
         // Summary row
         // University
         $this->University->GroupViewValue = $this->University->GroupOldValue();
         $this->University->CellAttrs["class"] = $this->RowGroupLevel == 1 ? "ewRptGrpSummary1" : "ewRptGrpField1";
         // Set up summary values
         $scvcnt = count($this->SummaryCurrentValue);
         for ($i = 0; $i < $scvcnt; $i++) {
             $this->SummaryViewValue[$i] = $this->SummaryCurrentValue[$i];
             $this->SummaryViewAttrs[$i]["style"] = "";
             $this->SummaryCellAttrs[$i]["style"] = "";
             $this->SummaryCellAttrs[$i]["class"] = $this->RowTotalType == EWR_ROWTOTAL_GROUP ? "ewRptGrpSummary" . $this->RowGroupLevel : "";
         }
         // University
         $this->University->HrefValue = "";
     } else {
         // University
         $this->University->GroupViewValue = $this->University->GroupValue();
         $this->University->CellAttrs["class"] = "ewRptGrpField1";
         if ($this->University->GroupValue() == $this->University->GroupOldValue() && !$this->ChkLvlBreak(1)) {
             $this->University->GroupViewValue = "&nbsp;";
         }
         // Set up summary values
         $scvcnt = count($this->SummaryCurrentValue);
         for ($i = 0; $i < $scvcnt; $i++) {
             $this->SummaryViewValue[$i] = $this->SummaryCurrentValue[$i];
             $this->SummaryViewAttrs[$i]["style"] = "";
             $this->SummaryCellAttrs[$i]["style"] = "";
             $this->SummaryCellAttrs[$i]["class"] = $this->RecCount % 2 != 1 ? "ewTableAltRow" : "ewTableRow";
         }
         // University
         $this->University->HrefValue = "";
     }
     // Call Cell_Rendered event
     if ($this->RowType == EWR_ROWTYPE_TOTAL) {
         // Summary row
         // University
         $this->CurrentIndex = 0;
         // Current index
         $CurrentValue = $this->University->GroupOldValue();
         $ViewValue =& $this->University->GroupViewValue;
         $ViewAttrs =& $this->University->ViewAttrs;
         $CellAttrs =& $this->University->CellAttrs;
         $HrefValue =& $this->University->HrefValue;
         $LinkAttrs =& $this->University->LinkAttrs;
         $this->Cell_Rendered($this->University, $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->COUNT28candidate_candStatusID29, $CurrentValue, $ViewValue, $ViewAttrs, $CellAttrs, $HrefValue, $LinkAttrs);
         }
     } else {
         // University
         $this->CurrentIndex = 0;
         // Group index
         $CurrentValue = $this->University->GroupValue();
         $ViewValue =& $this->University->GroupViewValue;
         $ViewAttrs =& $this->University->ViewAttrs;
         $CellAttrs =& $this->University->CellAttrs;
         $HrefValue =& $this->University->HrefValue;
         $LinkAttrs =& $this->University->LinkAttrs;
         $this->Cell_Rendered($this->University, $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->COUNT28candidate_candStatusID29, $CurrentValue, $ViewValue, $ViewAttrs, $CellAttrs, $HrefValue, $LinkAttrs);
         }
     }
     // Call Row_Rendered event
     $this->Row_Rendered();
     $this->SetupFieldCount();
 }
Beispiel #2
0
 function AccumulateSummary()
 {
     $cntx = count($this->Smry);
     for ($ix = 1; $ix < $cntx; $ix++) {
         $cnty = count($this->Smry[$ix]);
         for ($iy = 0; $iy < $cnty; $iy++) {
             $valwrk = $this->Val[$ix];
             $this->Cnt[$ix][$iy]++;
             $this->Smry[$ix][$iy] = ewr_SummaryValue($this->Smry[$ix][$iy], $valwrk, $this->getSummaryType());
         }
     }
 }