Prompt Macro that will use SQL WildCards

Technote (troubleshooting)


Creating a Prompt using the Prompt Macro that will place WildCard characters into the values you enter.

If you enter the following into the prompt:

ReportNet will send the following:

Which would return any value that starts with Can.


This is simply an example using the ?%? WildCard.
Depending on your needs you can use the _ (underscore) which will returns any single character, as opposed to any number of characters that a % will return.

Resolving the problem

In Framework Manager create a Macro for your Prompt:
For information on using the Prompt function see the Framework Manager User Guide (Chapter 3, section entitled: Using Query Macros to Create Prompts).

With the Prompt macro created modify it to include the concat function:
concat (#prompt('name','','','','','')#, '%')

This will concatenate the WildCard (%) onto the end of the value entered into the prompt.

With the Prompt macro created in this fashion, the reports will return records that match the value entered into the prompt along with records that begin with the value that they entered into the prompt.

Cross reference information
Segment Product Component Platform Version Edition
Business Analytics Cognos 8 Business Intelligence Report Studio
Business Analytics Cognos ReportNet ReportNet

Historical Number


Document information

More support for:

Cognos ReportNet

Software version:

Cognos 8 BI Report Studio 8.1, Cognos ReportNet 1.1MR2

Operating system(s):

All, Windows

Reference #:


Modified date:


Translate my page

Content navigation