COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: curious on 05 Dec 2010 02:49:09 PM

Title: two columns in value prompt
Post by: curious on 05 Dec 2010 02:49:09 PM
Is it possible to display two columns in a value prompt. For example Company name and revenue. Second column is just extra information.
Title: Re: two columns in value prompt
Post by: MFGF on 05 Dec 2010 02:59:26 PM
Hi,

Yes, this is fairly straightforward to do. Your Value Prompt is populated by a query in your report. Go to the query explorer and find this query. Add the Revenue value into the query as a new data item. Then add a new Data Item from the toolbox and set it's expression as [Company] + ' ' + cast([Revenue],char)
Finally, set this data item as the Display Value in the properties of your prompt.

Regards,

MF.
Title: Re: two columns in value prompt
Post by: curious on 06 Dec 2010 02:20:12 AM
@MFGF.
Thank you for your answer. I allready thought this would be a possible solution. You get a very bad layout however when Company name and revenue don't have an equal length. A struggle with the length of a  string etc is possible, but I hope for something easier.