COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: 84gopi on 02 Sep 2015 08:38:56 AM

Title: QE-DEF-0459 CCLException and QE-DEF-0260 Parsing error before or near position
Post by: 84gopi on 02 Sep 2015 08:38:56 AM
Hi,

My requirement is to display output as yes or No, for the 2 columns which has values 0 or 1.
So I have used below expression to get this, but getting

QE-DEF-0459 CCLException and QE-DEF-0260 Parsing error before or near position error in cognos report studio 10.2.

if ([Audit].[Audit Detail].[Audit Detail].[Audit Detail].[Question Is Auto Failure]  and
[Audit].[Audit Detail].[Audit Detail].[Audit Detail].[Answer is Auto Failure]  = 1)
then 'Yes'
else
'No'
end

Can any one help me to solve this ASAP?

Thanks
Gopi
Title: Re: QE-DEF-0459 CCLException and QE-DEF-0260 Parsing error before or near position
Post by: bdbits on 02 Sep 2015 08:54:55 AM
Unless your first condition is on a boolean data type, the expression is not valid. From what you wrote, you need to compare it to 0 or 1.
Title: Re: QE-DEF-0459 CCLException and QE-DEF-0260 Parsing error before or near position
Post by: BigChris on 02 Sep 2015 09:11:56 AM
Looks like you've got quite a few errors in there:

Quoteif ([Audit].[Audit Detail].[Audit Detail].[Audit Detail].[Question Is Auto Failure]  and
[Audit].[Audit Detail].[Audit Detail].[Audit Detail].[Answer is Auto Failure]  = 1)
then 'Yes'
else
'No'
end

I think it ought to read something like:

Quoteif ([Audit].[Audit Detail].[Audit Detail].[Audit Detail].[Question Is Auto Failure] =1   and
[Audit].[Audit Detail].[Audit Detail].[Audit Detail].[Answer is Auto Failure]  = 1)
then ('Yes') else ('No')
Title: Re: QE-DEF-0459 CCLException and QE-DEF-0260 Parsing error before or near position
Post by: 84gopi on 02 Sep 2015 09:42:38 AM
Hi,

I need to display as 'Yes' in the report, if my 1st condition is true ([Audit].[Audit Detail].[Audit Detail].[Audit Detail].[Question Is Auto Failure]  and [Audit].[Audit Detail].[Audit Detail].[Audit Detail].[Answer is Auto Failure]  = 1)

Else

it should display as 'No' .

Logic here is that : if Question is auto failure and answer is auto failure is 1, then it is auto failed (yes), else it is not.

So I am using above logic...I hope it clears now.
Title: Re: QE-DEF-0459 CCLException and QE-DEF-0260 Parsing error before or near position
Post by: BigChris on 02 Sep 2015 10:09:24 AM
Did my suggested version work for you?
Title: Re: QE-DEF-0459 CCLException and QE-DEF-0260 Parsing error before or near position
Post by: 84gopi on 04 Sep 2015 03:05:48 AM
yes, when i gave this condition and ran the report am getting wrong data, so need to re- design the model and report to get the issue fixed.

I am using dimensional modelling in my project. When I run the report few columns am getting same data ...so which is not correct.