COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: sunny bachan prasad on 04 May 2015 02:33:00 PM

Title: Comparison of paramter value with string
Post by: sunny bachan prasad on 04 May 2015 02:33:00 PM
Hi cognos guru,
I am working with relational package in report studio.Just want to know how we can compare the paramter value coming from prompt with the string value.I used caption function with paramter to convert it to string and then i campare the value with string but i am getting error.Can any one share his experiance where i am going wrong?

Thanks in advance :(
Title: Re: Comparison of paramter value with string
Post by: CognosAnalytics on 04 May 2015 08:08:09 PM
Hello sunny bachan Prasad,
The caption function returns the caption/label of a member in a dimensional source(cube). You say you are using a relational package, your comparison should be something straight forward like ?parameter_name? = 'some_string_value'. Why use the caption function at all?

-Cognos810
Title: Re: Comparison of paramter value with string
Post by: sunny bachan prasad on 05 May 2015 01:24:35 AM
Sorry Cognos810,
I am working on dimensional package.
Title: Re: Comparison of paramter value with string
Post by: Lynn on 05 May 2015 04:12:56 AM
Quote from: sunny bachan prasad on 04 May 2015 02:33:00 PM
Hi cognos guru,
I am working with relational package in report studio.Just want to know how we can compare the paramter value coming from prompt with the string value.I used caption function with paramter to convert it to string and then i campare the value with string but i am getting error.Can any one share his experiance where i am going wrong?

Thanks in advance :(

It would make sense for you to share any expressions you are using, what you need to do with the parameter value, and, oh, also the error you are getting. Perhaps take a look at the forum etiquette sticky for guidance on how to best request help.