function GetColumns()
 {
     global $conn;
     global $ReportLanguage;
     $this->LoadColumnValues($this->Filter);
     // 1st dimension = no of groups (level 0 used for grand total)
     // 2nd dimension = no of distinct values
     $nGrps = 1;
     $this->Val =& ewr_InitArray($this->ColCount + 1, NULL);
     $this->ValCnt =& ewr_InitArray($this->ColCount + 1, NULL);
     $this->Cnt =& ewr_Init2DArray($this->ColCount + 1, $nGrps + 1, NULL);
     $this->Smry =& ewr_Init2DArray($this->ColCount + 1, $nGrps + 1, NULL);
     $this->SmryCnt =& ewr_Init2DArray($this->ColCount + 1, $nGrps + 1, NULL);
     // Reset summary values
     $this->ResetLevelSummary(0);
     // Get active columns
     if (!is_array($this->dateCreated->SelectionList)) {
         $this->ColSpan = $this->ColCount;
     } else {
         $this->ColSpan = 0;
         for ($i = 1; $i <= $this->ColCount; $i++) {
             $bSelected = FALSE;
             $cntsel = count($this->dateCreated->SelectionList);
             for ($j = 0; $j < $cntsel; $j++) {
                 if (ewr_CompareValue($this->dateCreated->SelectionList[$j], $this->Col[$i]->Value, 3)) {
                     $this->ColSpan++;
                     $bSelected = TRUE;
                     break;
                 }
             }
             $this->Col[$i]->Visible = $bSelected;
         }
     }
     $this->ColSpan++;
     // Add summary column
 }
Esempio n. 2
0
function ewr_IsSelectedValue(&$ar, $value, $ft)
{
    if (!is_array($ar)) {
        return TRUE;
    }
    $af = substr($value, 0, 2) == "@@";
    foreach ($ar as $val) {
        if ($af || substr($val, 0, 2) == "@@") {
            // Advanced filters
            if ($val == $value) {
                return TRUE;
            }
        } elseif ($value == EWR_NULL_VALUE && $value == $val) {
            return TRUE;
        } else {
            if (ewr_CompareValue($val, $value, $ft)) {
                return TRUE;
            }
        }
    }
    return FALSE;
}