COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: pikachu on 11 Jun 2007 11:13:32 AM

Title: how to use prompt to display a selected list of records?
Post by: pikachu on 11 Jun 2007 11:13:32 AM
As the subject says, how do I do it? for example, I am using the following macro:

#prompt ( 'Campaign Name', 'string', '', '', '[Responses].[Campaigns].[NAME]')#

But in the list of Campaign Names that I want the user to pick, I only want NAME that has the string "RECON" in them. How do I implement it? Do I need to use a parameter map?

hope someone can help me out. thanks.
Title: Re: how to use prompt to display a selected list of records?
Post by: mrcool on 11 Jun 2007 09:51:59 PM
Y dnt u try using like function in Query expression of [Responses].[Campaigns].[NAME]
Title: Re: how to use prompt to display a selected list of records?
Post by: pikachu on 12 Jun 2007 01:14:57 AM
hi mrcool,

I've tried :

#prompt ( 'Campaign Name', 'string', '', '', '[Responses].[Campaigns].[NAME] like %RECON%')#

but it still doesn't filter.

Do i do this in FM or in Report Studio?

If I do this in Report Studio Data->Filters :
[Responses].[Campaigns].[NAME] like '%RECON%'

It says QE-DEF-0260 parsing error

Please help. Thanks!
Title: Re: how to use prompt to display a selected list of records?
Post by: mrcool on 18 Jun 2007 07:58:33 AM
just in filter giv [Responses].[Campaigns].[NAME] like %RECON%'

This works
Title: Re: how to use prompt to display a selected list of records?
Post by: MDXpressor on 22 Jun 2007 01:48:17 PM
Quote from: mrcool on 18 Jun 2007 07:58:33 AM
just in filter giv [Responses].[Campaigns].[NAME] like %RECON%'

This works
If your DB is dying on the like statement, try a contains instead.