COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: bpothier on 16 May 2012 01:43:35 PM

Title: RESOLVED - Separating Prompt Values by Semi Colon
Post by: bpothier on 16 May 2012 01:43:35 PM
I have a value prompt that displays a list of managers. The users can select multiple managers from the prompt. On the report I have a paramdisplay value layout calculation to show what values (managers) the user selected. Right now they are comma spearate like this  doe,john,doe,sally,blow,joe

Is there a way to get it so they look like this    doe,john ; doe,sally ; blow,joe for ease of reading?
thanks
Bret
Title: Separating Prompt Values by Semi Colon
Post by: MFGF on 20 May 2012 04:27:58 AM
Just a thought - instead of using a layout calculation based on the parameter, try using a repeater based on the filtered query and showing the name item. You can drop a text item into the repeater after the item to provide your semicolons.

MF.

Sent from my iPad using Tapatalk HD
Title: Re: Separating Prompt Values by Semi Colon
Post by: bpothier on 21 May 2012 07:47:57 AM
Thank you for the reply. I will give that a try
Title: Re: Separating Prompt Values by Semi Colon
Post by: bpothier on 21 May 2012 08:04:17 AM
Hi there,

I tried that and what I get is a list of all managers separated by a semi colon. What I woudl like is just the ones the user selects from the manager prompt.

We have a prompt query set up to go along with the prompt itself which are reuseable components. When I use the manager field from the prompt query it returns the above. If I add the manager field to the base query of the report and add it to the repeater it removes the prompt query which is not good.

Any thoguhts? I appreciate your help
Title: Re: Separating Prompt Values by Semi Colon
Post by: Lynn on 21 May 2012 09:46:46 AM
Why not make a copy of your prompt query and then filter it for the prompt selection....then use that query to source the repeater.

Title: Re: Separating Prompt Values by Semi Colon
Post by: bpothier on 21 May 2012 10:25:22 AM
Hi Lynn,

I m not sure I am following. So I copy the prompt query - but how would I filter it for the prompts selected?
Title: Re: Separating Prompt Values by Semi Colon
Post by: Lynn on 21 May 2012 10:29:39 AM
The same way you use the parameter to filter your report query.

Create a filter in the query and use an expression that says something like:

[Manager] in (?PromptManagers?)

You just need the data item that corresponds to the "use" value in the query to filter on, and also include the "display" value (name) in the query to use in the repeater.

Title: Re: Separating Prompt Values by Semi Colon
Post by: bpothier on 21 May 2012 01:27:31 PM
Thank you so much Lynn...worked like a charm.

Bret
Title: Re: Separating Prompt Values by Semi Colon
Post by: Lynn on 21 May 2012 01:33:14 PM
Ah well, it was the muppet's idea to begin with :)

Glad you got it going!