×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Cognos Impromptu

Multiple Type-In Prompt Report in Cognos Impromptu by GJParker
Posted: 20 Oct 05

The following is copied from an article originally submitted to Cognos SupportLink by By Trevor Comeau, Support Specialist, Cognos Customer Support

The original article can be seen here
http://support.cognos.com/supported/supportlink/14n1/p60.html

I have copied the article here for those users who do not have access to the Cognos support site.

By default, Cognos Impromptu does not support the ability to input multiple entries into a type-in. The following is a method that will allow a user to type in multiple entries into a prompt, delimited by commas. This example allows the user to enter up to three prompt values separated by commas. Five calculations are required to turn the original prompt into three separate values that can be passed to the filter. The steps are shown below.
  

Step 1
Calculation 1: Find the position of the first comma in the prompt. (You can create the prompt in this calculation.)

Calculation Name = C1

CODE

position(',',?P1?)

 
Step 2
Calculation 2: Substring the first value from the prompt based on the first comma's position.

Calculation Name = P1

CODE

substring (?P1?,0,C1 )

Step 3
Calculation 3: Find the second comma by substringing the first prompt value (and comma) from the prompt.

Calculation Name = C2

CODE

position(',',substring( ?P1?,1 + C1,100))+C1

Step 4
Calculation 4: Substring the second prompt value from the report.

Calculation Name = P2

CODE

substring(?P1?,C1 + 1,C2 - C1 - 1)

Step 5
Calculation 5: Substring the third value from the prompt.

Calculation Name = P3

CODE

substring(?P1?,1 + C2,100)

Step 6
In the filter, define the following definition to use all three values that were extracted from the original type-in prompt.

CODE

BranchCode in ( P1,P2,P3 )

Step 7
The prompt entry will be:

CODE

MAN,STOC,MEL
 
The ability to handle more type-in values can be added into the report but it will require each one to be extracted via its own calculation.

 


Back to Cognos solutions FAQ Index
Back to Cognos solutions Forum


My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close