Prompt Macro that will use SQL WildCards

Technote (troubleshooting)


Problem(Abstract)

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

Example:
If you enter the following into the prompt:
Can

ReportNet will send the following:
Can%

Which would return any value that starts with Can.

NOTE:

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:
Prompt('PromptName')
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

1010440

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Cognos ReportNet
ReportNet

Software version:

Cognos 8 BI Report Studio 8.1, Cognos ReportNet 1.1MR2

Operating system(s):

All, Win, Windows

Reference #:

1344402

Modified date:

2006-08-04

Translate my page

Machine Translation

Content navigation