If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Case Statement syntax errors in Report Studio

Started by civicman4, 21 Dec 2010 08:28:35 AM

Previous topic - Next topic

civicman4

I'm trying to define a case statement for one of the data items in my report but I keep getting syntax errors and I don't know whats wrong with it. Here is my code:

CASE
WHEN [Presentation Layer].[Act To Bud].[Account #] in_range {40000:49999} THEN ("Net Sales")
WHEN [Presentation Layer].[Act To Bud].[Account #] in_range {50000:59999} THEN ("COS")
WHEN [Presentation Layer].[Act To Bud].[Account #] in_range {40000:59999} THEN ("Gross Profit")
END

Lynn

Try single quotes instead of double quotes.

THEN ('Net Sales')

instead of

THEN ("Net Sales")

Sreeni P

#2
Quote from: civicman4 on 21 Dec 2010 08:28:35 AM
I'm trying to define a case statement for one of the data items in my report but I keep getting syntax errors and I don't know whats wrong with it. Here is my code:

CASE
WHEN [Presentation Layer].[Act To Bud].[Account #] in_range {40000:49999} THEN ("Net Sales")
WHEN [Presentation Layer].[Act To Bud].[Account #] in_range {50000:59999} THEN ("COS")
WHEN [Presentation Layer].[Act To Bud].[Account #] in_range {40000:59999} THEN ("Gross Profit")
END

and also check with member type conversions