Consultor Eletrônico



Kbase P96921: Report Builder: CASE function in Calculated Field returns wrong result
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/29/2004
Status: Unverified

SYMPTOM(s):

Report Builder

CASE function returns wrong result

SUBSTRING function is used to generate the return value of the CASE function i.e.

CASE(<field>, <value>, "SUBSTRING(<parameters>)", <default value>)

The statement "SUBSTRING(<parameters>)" is returned instead of the result of SUBSTRING

CAUSE:

The SUBSTRING function is encapsulated in quotation marks (") and is therefore treated as a literal value

FIX:

Remove the quotation marks (") encapsulating the SUBSTRING function so that it is evaluated properly i.e.

CASE(<field>, <value>, SUBSTRING(<parameters>), <default value>)