If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Display the Paramater Values in the report one after ther instead commas

Started by Nandini.t, 19 Jun 2017 06:29:58 AM

Previous topic - Next topic

Nandini.t

Hi Everyone,

I have a requirement where when I select multiple values in a prompt, those values should be shown on report page.
Usually Cognos displays the values with comma separated. But, my requirement is to display one below the other instead of comma separated.

Ex: If values A,B,C,D,E is selected in the prompt then on my report page it should be displayed as

A
B
C
D
E
instead A,B,C,D,E

If I use list to get this I need a separate query for this which reviewer is not accepting .
Please let me know if anybody have any other alternative solution for this.

Thanks in Advance !

New_Guy

Hi,
How many characters are the parameters, are they fixed length? if they are fixed length then place them in a block of fixed width and then they will appear one below the other with a comma at the end.

One more option is to use the same query item that is getting the parameters, from the main query that you are creating the list or crosstab and use it in the other list for displaying the parameter. you dont have to create another query for just this purpose.
Good luck
New guy

bdbits

Not somewhere I can test this out right now, but something like this might work to split up the elements where your prompt is called pValues.

#csv(split(',', 'pValues'))#

CognosPaul

I had a similar requirement once.

Create a new query and data item with the following expression:
#
sq(
'<ol><li>'+
join('</li><li>',split(';',promptmany('param','token')))
+'</li></ol>'
)
#

OR
#
sq('<div><span>'+
join('</span></div><div><span>',split(';',promptmany('test','token')))
+'</span></div>'
)
#


Then create a singleton based on that query, pull in a rich text item, and set the data item as the value for the rich text item.

bdbits

I'd go with what CognosPaul writes any day of the week.   8)