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

Multi-line Like Parameter

Started by stnunn, 15 Feb 2010 06:25:50 PM

Previous topic - Next topic

stnunn

I would like to do a "multi-line like" parameter in Report Studio, but this doesn't seem to be available.  It is, however, available in Query Studio as "Matches SQL Pattern".  When opening the QS report in RS, it looks like it's using a macro (note the #'s).

Here is what the QS code looks like in RS:

#join('or',substitute('^','[ITEM] like ',sq(array('%123%','%456%'))))#

In other words, I want to find everything like 123 or like 456.

I tried using a multi-line text box prompt and putting ?parameter? where we see '%123%','%456%', but no luck.

Any ideas?
Thanks!

CognosPaul

?parameter? is a prompt alias. You'd need to use the real prompt macro for it to work. So try using:


#join('or',substitute('^','[ITEM] like ',sq(array(promptmany('par','string')))))#


cogan

I was just going to ask the same question! Thank you PaulM!!

lindero

Hi,

sometimes there is a database function which can handle your requirement without using prompt macros.

On Teradata database the magic word is "like some".

i.e.:

[column] like some ('%123%,'%345%')

so maybe you database are also able to do this.

cheers...