COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: cognosun on 20 Mar 2017 11:23:16 AM

Title: Map:String Parameter - Numeric Parameter
Post by: cognosun on 20 Mar 2017 11:23:16 AM
Hi Gurus,

I have a parameter ?p_name? (coming from table1.ename).

I will pass value to ?p_name? like below, in prompt page, only one value at a time (Select and Search prompt/ single select).

ex:

?p_name?  table.eid (corresponding numeric reference)
   abc            100



Now my problem is...

User will search for a value in ?p_name?, say abc, he'll get it, now he'll run the report, but here i want the value to get pass is 100 (not abc).

This is in report query detail filter. Reason being numeric input is working faster than string input.

With Value prompt its simple to do, but as it's Select and Search prompt, USE/DISPLAY logic is not working.


Many Thanks in advance


Title: Re: Map:String Parameter - Numeric Parameter
Post by: cognosun on 20 Mar 2017 09:48:58 PM
Any ideas ?
Title: Re: Map:String Parameter - Numeric Parameter
Post by: BigChris on 21 Mar 2017 02:49:48 AM
In your prompt you've got a "Display Value" and a "Use Value" in your example you'd have abc as your display value and 100 as your use value
Title: Re: Map:String Parameter - Numeric Parameter
Post by: New_Guy on 21 Mar 2017 09:00:03 AM
Hi,
As Big Chris mentioned select and search can take use and display values. When user searches for 'ABC' the respective value 100 will be sent to the filter.
Good luck
New guy
Title: Re: Map:String Parameter - Numeric Parameter
Post by: cognosun on 22 Mar 2017 10:54:45 PM
In Select and Search prompt, "Use" value's role is limited. Ultimately it's the Searched value(displayed), which get's store in the parameter name.

Now if i use this parameter name in main report detail filter, i get only names(display values), not Use values (ID's).