function ProcessAjaxPopup() { global $conn, $ReportLanguage; $fld = NULL; if (@$_GET["popup"] != "") { $popupname = $_GET["popup"]; // Check popup name // Output data as Json if (!is_null($fld)) { $jsdb = ewr_GetJsDb($fld, $fld->FldType); ob_end_clean(); echo $jsdb; exit; } } }
function ProcessAjaxPopup() { global $conn, $ReportLanguage; $fld = NULL; if (@$_GET["popup"] != "") { $popupname = $_GET["popup"]; // Check popup name // Build distinct values for invid if ($popupname == 'inv500_invid') { $bNullValue = FALSE; $bEmptyValue = FALSE; $sFilter = $this->Filter; $sSql = ewr_BuildReportSql($this->invid->SqlSelect, $this->getSqlWhere(), $this->getSqlGroupBy(), $this->getSqlHaving(), $this->invid->SqlOrderBy, $sFilter, ""); $rswrk = $conn->Execute($sSql); while ($rswrk && !$rswrk->EOF) { $this->invid->setDbValue($rswrk->fields[0]); if (is_null($this->invid->CurrentValue)) { $bNullValue = TRUE; } elseif ($this->invid->CurrentValue == "") { $bEmptyValue = TRUE; } else { $this->invid->GroupViewValue = $this->invid->GroupValue(); ewr_SetupDistinctValues($this->invid->ValueList, $this->invid->GroupValue(), $this->invid->GroupViewValue, FALSE); } $rswrk->MoveNext(); } if ($rswrk) { $rswrk->Close(); } if ($bEmptyValue) { ewr_SetupDistinctValues($this->invid->ValueList, EWR_EMPTY_VALUE, $ReportLanguage->Phrase("EmptyLabel"), FALSE); } if ($bNullValue) { ewr_SetupDistinctValues($this->invid->ValueList, EWR_NULL_VALUE, $ReportLanguage->Phrase("NullLabel"), FALSE); } $fld =& $this->invid; } // Output data as Json if (!is_null($fld)) { $jsdb = ewr_GetJsDb($fld, $fld->FldType); ob_end_clean(); echo $jsdb; exit; } } }