Icon View Incident Report

Serious Serious
Reported By: Fernando Dias
Reported On: 9/10/2020
For: Version 2.32 Build 1
# 4784 Attempting to Apply a Filter on a SELECT Expression Column Can Result in a Filter Error

The following error message pops up when I try to set Active to TRUE in design time for the attached query, but the error also happens at run time:

ElevateDB Error #1001 - A filter error occurred (Access violation at....)

It only happens with one of these columns in the filter: NomeFornecedor, DocsFornecedor and ValorDocsFornecedor - one of the columns that result from a sub-select.

SELECT
  *,
  (SELECT Nome FROM Fornecedores WHERE CodFornecedor = tmpV.CodFornecedor) AS NomeFornecedor,
  (SELECT CAST(LIST(DISTINCT (CL.TipoDoc + '-' + CAST(NumReg AS VARCHAR)), ', ') AS VARCHAR(80)) FROM ComLin CL WHERE (CL.AnoVou, CL.SerieVou, CL.NumVou) = (tmpV.AnoDoc, tmpV.SerieDoc, tmpV.NumVoucher)) AS DocsFornecedor,
  (SELECT SUM(CL.Valor + COALESCE(CL.TotalTaxas,0)) FROM ComLin CL WHERE (CL.AnoVou, CL.SerieVou, CL.NumVou) = (tmpV.AnoDoc, tmpV.SerieDoc, tmpV.NumVoucher)) AS ValorDocsFornecedor
FROM
  (
    SELECT
      V.*, 
      B.NumCliente, B.Nome AS NomeCliente, B.CriadoPor,
      CAST(LIST(DISTINCT (BL.SerieFac + '/' + CAST(BL.NumFac AS VARCHAR)), ', ') AS VARCHAR(80)) AS DocsCliente,
      SUM(BL.Qt*(BL.PCusto*((100+BL.PctIvaPCusto)/100) + BL.Taxas+BL.TaxaYP+BL.TaxaPT)) AS ValorDocsCliente
    FROM
      Vouchers V
      LEFT OUTER JOIN BolLin BL ON (BL.AnoDoc, BL.SerieDoc, BL.NumDoc, BL.NumVoucher) = (V.AnoDoc, V.SerieDoc, V.NumDoc, V.NumVoucher)
      LEFT OUTER JOIN BolCab B ON (B.AnoDoc, B.SerieDoc, B.NumDoc) = (V.AnoDoc, V.SerieDoc, V.NumDoc)
    GROUP BY
       V.AnoDoc, V.SerieDoc, V.NumVoucher
  ) AS tmpV
ORDER BY
  AnoDoc, SerieDoc, NumVoucher



Resolution Resolution
Fixed Problem on 10/10/2020 in version 2.33 build 1


Products Affected Products Affected
ElevateDB Additional Software and Utilities
ElevateDB LCL Standard with Source
ElevateDB PHP Standard
ElevateDB PHP Standard with Source
ElevateDB PHP Trial
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image