</div>
<?php 
                }
                ?>
	</td>
<?php 
            }
        }
        ?>
<!-- Dynamic columns begin -->
<?php 
        $cntval = count($Page->Val);
        for ($iy = 1; $iy < $cntval; $iy++) {
            if ($Page->Col[$iy]->Visible) {
                $Page->SummaryCurrentValue[$iy - 1] = $Page->Col[$iy]->Caption;
                $Page->SummaryViewValue[$iy - 1] = ewr_FormatDateTime($Page->SummaryCurrentValue[$iy - 1], 5);
                ?>
		<td class="ewTableHeader"<?php 
                echo $Page->dateCreated->CellAttributes();
                ?>
><div<?php 
                echo $Page->dateCreated->ViewAttributes();
                ?>
><?php 
                echo $Page->SummaryViewValue[$iy - 1];
                ?>
</div></td>
<?php 
            }
        }
        ?>
Пример #2
0
 function RenderRow()
 {
     global $conn, $rs, $Security, $ReportLanguage;
     if ($this->RowTotalType == EWR_ROWTOTAL_GRAND && !$this->GrandSummarySetup) {
         // Grand total
         $bGotCount = FALSE;
         $bGotSummary = FALSE;
         // Get total count from sql directly
         $sSql = ewr_BuildReportSql($this->getSqlSelectCount(), $this->getSqlWhere(), $this->getSqlGroupBy(), $this->getSqlHaving(), "", $this->Filter, "");
         $rstot = $conn->Execute($sSql);
         if ($rstot) {
             $this->TotCount = $rstot->RecordCount() > 1 ? $rstot->RecordCount() : $rstot->fields[0];
             $rstot->Close();
             $bGotCount = TRUE;
         } else {
             $this->TotCount = 0;
         }
         $bGotSummary = TRUE;
         // Accumulate grand summary from detail records
         if (!$bGotCount || !$bGotSummary) {
             $sSql = ewr_BuildReportSql($this->getSqlSelect(), $this->getSqlWhere(), $this->getSqlGroupBy(), $this->getSqlHaving(), "", $this->Filter, "");
             $rs = $conn->Execute($sSql);
             if ($rs) {
                 $this->GetRow(1);
                 while (!$rs->EOF) {
                     $this->AccumulateGrandSummary();
                     $this->GetRow(2);
                 }
                 $rs->Close();
             }
         }
         $this->GrandSummarySetup = TRUE;
         // No need to set up again
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     //
     // Render view codes
     //
     if ($this->RowType == EWR_ROWTYPE_TOTAL) {
         // Summary row
         // Count(messages.message)
         $this->Count28messages_message29->HrefValue = "";
         // timeta
         $this->timeta->HrefValue = "";
     } else {
         // Count(messages.message)
         $this->Count28messages_message29->ViewValue = $this->Count28messages_message29->CurrentValue;
         $this->Count28messages_message29->CellAttrs["class"] = $this->RecCount % 2 != 1 ? "ewTableAltRow" : "ewTableRow";
         // timeta
         $this->timeta->ViewValue = $this->timeta->CurrentValue;
         $this->timeta->ViewValue = ewr_FormatDateTime($this->timeta->ViewValue, 7);
         $this->timeta->CellAttrs["class"] = $this->RecCount % 2 != 1 ? "ewTableAltRow" : "ewTableRow";
         // Count(messages.message)
         $this->Count28messages_message29->HrefValue = "";
         // timeta
         $this->timeta->HrefValue = "";
     }
     // Call Cell_Rendered event
     if ($this->RowType == EWR_ROWTYPE_TOTAL) {
         // Summary row
     } else {
         // Count(messages.message)
         $CurrentValue = $this->Count28messages_message29->CurrentValue;
         $ViewValue =& $this->Count28messages_message29->ViewValue;
         $ViewAttrs =& $this->Count28messages_message29->ViewAttrs;
         $CellAttrs =& $this->Count28messages_message29->CellAttrs;
         $HrefValue =& $this->Count28messages_message29->HrefValue;
         $LinkAttrs =& $this->Count28messages_message29->LinkAttrs;
         $this->Cell_Rendered($this->Count28messages_message29, $CurrentValue, $ViewValue, $ViewAttrs, $CellAttrs, $HrefValue, $LinkAttrs);
         // timeta
         $CurrentValue = $this->timeta->CurrentValue;
         $ViewValue =& $this->timeta->ViewValue;
         $ViewAttrs =& $this->timeta->ViewAttrs;
         $CellAttrs =& $this->timeta->CellAttrs;
         $HrefValue =& $this->timeta->HrefValue;
         $LinkAttrs =& $this->timeta->LinkAttrs;
         $this->Cell_Rendered($this->timeta, $CurrentValue, $ViewValue, $ViewAttrs, $CellAttrs, $HrefValue, $LinkAttrs);
     }
     // Call Row_Rendered event
     $this->Row_Rendered();
     $this->SetupFieldCount();
 }
 function RenderRow()
 {
     global $conn, $rs, $Security, $ReportLanguage;
     if ($this->RowTotalType == EWR_ROWTOTAL_GRAND && !$this->GrandSummarySetup) {
         // Grand total
         $bGotCount = FALSE;
         $bGotSummary = FALSE;
         // Get total count from sql directly
         $sSql = ewr_BuildReportSql($this->getSqlSelectCount(), $this->getSqlWhere(), $this->getSqlGroupBy(), $this->getSqlHaving(), "", $this->Filter, "");
         $rstot = $conn->Execute($sSql);
         if ($rstot) {
             $this->TotCount = $rstot->RecordCount() > 1 ? $rstot->RecordCount() : $rstot->fields[0];
             $rstot->Close();
             $bGotCount = TRUE;
         } else {
             $this->TotCount = 0;
         }
         // Get total from sql directly
         $sSql = ewr_BuildReportSql($this->getSqlSelectAgg(), $this->getSqlWhere(), $this->getSqlGroupBy(), $this->getSqlHaving(), "", $this->Filter, "");
         $sSql = $this->getSqlAggPfx() . $sSql . $this->getSqlAggSfx();
         $rsagg = $conn->Execute($sSql);
         if ($rsagg) {
             $this->GrandCnt[1] = $this->TotCount;
             $this->GrandSmry[1] = $rsagg->fields("sum_job_offered_candidates");
             $this->GrandCnt[2] = $this->TotCount;
             $rsagg->Close();
             $bGotSummary = TRUE;
         }
         // Accumulate grand summary from detail records
         if (!$bGotCount || !$bGotSummary) {
             $sSql = ewr_BuildReportSql($this->getSqlSelect(), $this->getSqlWhere(), $this->getSqlGroupBy(), $this->getSqlHaving(), "", $this->Filter, "");
             $rs = $conn->Execute($sSql);
             if ($rs) {
                 $this->GetRow(1);
                 while (!$rs->EOF) {
                     $this->AccumulateGrandSummary();
                     $this->GetRow(2);
                 }
                 $rs->Close();
             }
         }
         $this->GrandSummarySetup = TRUE;
         // No need to set up again
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     //
     // Render view codes
     //
     if ($this->RowType == EWR_ROWTYPE_TOTAL) {
         // Summary row
         // Job_Name
         $this->Job_Name->GroupViewValue = $this->Job_Name->GroupOldValue();
         $this->Job_Name->CellAttrs["class"] = $this->RowGroupLevel == 1 ? "ewRptGrpSummary1" : "ewRptGrpField1";
         $this->Job_Name->GroupViewValue = ewr_DisplayGroupValue($this->Job_Name, $this->Job_Name->GroupViewValue);
         $this->Job_Name->GroupSummaryOldValue = $this->Job_Name->GroupSummaryValue;
         $this->Job_Name->GroupSummaryValue = $this->Job_Name->GroupViewValue;
         $this->Job_Name->GroupSummaryViewValue = $this->Job_Name->GroupSummaryOldValue != $this->Job_Name->GroupSummaryValue ? $this->Job_Name->GroupSummaryValue : "&nbsp;";
         // Job_Offered_Candidates
         $this->Job_Offered_Candidates->SumViewValue = $this->Job_Offered_Candidates->SumValue;
         $this->Job_Offered_Candidates->CellAttrs["class"] = $this->RowTotalType == EWR_ROWTOTAL_PAGE || $this->RowTotalType == EWR_ROWTOTAL_GRAND ? "ewRptGrpAggregate" : "ewRptGrpSummary" . $this->RowGroupLevel;
         // Job_Name
         $this->Job_Name->HrefValue = "";
         // Job_Offered_Candidates
         $this->Job_Offered_Candidates->HrefValue = "";
         // dateCreated
         $this->dateCreated->HrefValue = "";
     } else {
         // Job_Name
         $this->Job_Name->GroupViewValue = $this->Job_Name->GroupValue();
         $this->Job_Name->CellAttrs["class"] = "ewRptGrpField1";
         $this->Job_Name->GroupViewValue = ewr_DisplayGroupValue($this->Job_Name, $this->Job_Name->GroupViewValue);
         if ($this->Job_Name->GroupValue() == $this->Job_Name->GroupOldValue() && !$this->ChkLvlBreak(1)) {
             $this->Job_Name->GroupViewValue = "&nbsp;";
         }
         // Job_Offered_Candidates
         $this->Job_Offered_Candidates->ViewValue = $this->Job_Offered_Candidates->CurrentValue;
         $this->Job_Offered_Candidates->CellAttrs["class"] = $this->RecCount % 2 != 1 ? "ewTableAltRow" : "ewTableRow";
         // dateCreated
         $this->dateCreated->ViewValue = $this->dateCreated->CurrentValue;
         $this->dateCreated->ViewValue = ewr_FormatDateTime($this->dateCreated->ViewValue, 5);
         $this->dateCreated->CellAttrs["class"] = $this->RecCount % 2 != 1 ? "ewTableAltRow" : "ewTableRow";
         $this->dateCreated->CellAttrs["style"] = "white-space: nowrap;";
         // Job_Name
         $this->Job_Name->HrefValue = "";
         // Job_Offered_Candidates
         $this->Job_Offered_Candidates->HrefValue = "";
         // dateCreated
         $this->dateCreated->HrefValue = "";
     }
     // Call Cell_Rendered event
     if ($this->RowType == EWR_ROWTYPE_TOTAL) {
         // Summary row
         // Job_Name
         $CurrentValue = $this->Job_Name->GroupViewValue;
         $ViewValue =& $this->Job_Name->GroupViewValue;
         $ViewAttrs =& $this->Job_Name->ViewAttrs;
         $CellAttrs =& $this->Job_Name->CellAttrs;
         $HrefValue =& $this->Job_Name->HrefValue;
         $LinkAttrs =& $this->Job_Name->LinkAttrs;
         $this->Cell_Rendered($this->Job_Name, $CurrentValue, $ViewValue, $ViewAttrs, $CellAttrs, $HrefValue, $LinkAttrs);
         // Job_Offered_Candidates
         $CurrentValue = $this->Job_Offered_Candidates->SumValue;
         $ViewValue =& $this->Job_Offered_Candidates->SumViewValue;
         $ViewAttrs =& $this->Job_Offered_Candidates->ViewAttrs;
         $CellAttrs =& $this->Job_Offered_Candidates->CellAttrs;
         $HrefValue =& $this->Job_Offered_Candidates->HrefValue;
         $LinkAttrs =& $this->Job_Offered_Candidates->LinkAttrs;
         $this->Cell_Rendered($this->Job_Offered_Candidates, $CurrentValue, $ViewValue, $ViewAttrs, $CellAttrs, $HrefValue, $LinkAttrs);
     } else {
         // Job_Name
         $CurrentValue = $this->Job_Name->GroupValue();
         $ViewValue =& $this->Job_Name->GroupViewValue;
         $ViewAttrs =& $this->Job_Name->ViewAttrs;
         $CellAttrs =& $this->Job_Name->CellAttrs;
         $HrefValue =& $this->Job_Name->HrefValue;
         $LinkAttrs =& $this->Job_Name->LinkAttrs;
         $this->Cell_Rendered($this->Job_Name, $CurrentValue, $ViewValue, $ViewAttrs, $CellAttrs, $HrefValue, $LinkAttrs);
         // Job_Offered_Candidates
         $CurrentValue = $this->Job_Offered_Candidates->CurrentValue;
         $ViewValue =& $this->Job_Offered_Candidates->ViewValue;
         $ViewAttrs =& $this->Job_Offered_Candidates->ViewAttrs;
         $CellAttrs =& $this->Job_Offered_Candidates->CellAttrs;
         $HrefValue =& $this->Job_Offered_Candidates->HrefValue;
         $LinkAttrs =& $this->Job_Offered_Candidates->LinkAttrs;
         $this->Cell_Rendered($this->Job_Offered_Candidates, $CurrentValue, $ViewValue, $ViewAttrs, $CellAttrs, $HrefValue, $LinkAttrs);
         // dateCreated
         $CurrentValue = $this->dateCreated->CurrentValue;
         $ViewValue =& $this->dateCreated->ViewValue;
         $ViewAttrs =& $this->dateCreated->ViewAttrs;
         $CellAttrs =& $this->dateCreated->CellAttrs;
         $HrefValue =& $this->dateCreated->HrefValue;
         $LinkAttrs =& $this->dateCreated->LinkAttrs;
         $this->Cell_Rendered($this->dateCreated, $CurrentValue, $ViewValue, $ViewAttrs, $CellAttrs, $HrefValue, $LinkAttrs);
     }
     // Call Row_Rendered event
     $this->Row_Rendered();
     $this->SetupFieldCount();
 }
Пример #4
0
function ewr_ChartXValue($val, $dt)
{
    if (is_numeric($dt)) {
        return ewr_FormatDateTime($val, $dt);
    } elseif ($dt == "y") {
        return $val;
    } elseif ($dt == "xyq") {
        $ar = explode("|", $val);
        if (count($ar) >= 2) {
            return $ar[0] . " " . ewr_QuarterName($ar[1]);
        } else {
            return $val;
        }
    } elseif ($dt == "xym") {
        $ar = explode("|", $val);
        if (count($ar) >= 2) {
            return $ar[0] . " " . ewr_MonthName($ar[1]);
        } else {
            return $val;
        }
    } elseif ($dt == "xq") {
        return ewr_QuarterName($val);
    } elseif ($dt == "xm") {
        return ewr_MonthName($val);
    } else {
        if (is_string($val)) {
            return trim($val);
        } else {
            return $val;
        }
    }
}