COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: rcoon on 21 Dec 2010 01:12:11 PM

Title: List object as prompt
Post by: rcoon on 21 Dec 2010 01:12:11 PM
Is it possible to make a List object behave similar to a Value Prompt and set a parameter value?  I'd like my prompt page to display more information that what would appear in a value prompt, ideally a list with multiple columns, and have the user be able to click on items from the first column of the list to set the paramter value.

Thanks,
rob
Title: Re: List object as prompt
Post by: charlie on 22 Dec 2010 08:07:24 AM
I am not sure if the list behavior can be achieved in a value prompt. But if you want to display additional information, an alternate approach would be to concatenate the fields.

e.g.Create a data item as:  [Roll_no]||' - '||[Student_Name]

and output will be like :
1 - Alex
2 - Bob
3 - Charles
Title: Re: List object as prompt
Post by: rcoon on 22 Dec 2010 03:59:10 PM
Thanks,

That's a good idea, but it doesn't quite meet our needs.  I should have mentioned that our List contains a slave graph, so the user has visual information about the product they are select.  This obviously would be impossible to put into a value prompt, so I am really hoping to make a List-based approach work.

But I appreciate the suggestion.  It could be helpful in another situation.

thanks,
rob
Title: Re: List object as prompt
Post by: Lynn on 23 Dec 2010 06:55:19 AM
The only thing I can think of is to make it a drill through. Present your list with all the widgets you like and make the value of the parameter to pass a drill through link. It could even be a drill through back to the report itself so you wouldn't need a separate source and target report.
Title: Re: List object as prompt
Post by: CognosPaul on 23 Dec 2010 09:06:56 AM
This is the kind of request that I love. I've done something similar, so I took a few minutes to adapt it to what I think your needs are.

There are a few ways to do this. Each way is complicated, but I've attached an example XML of the easiest way. (You need to log in to see the attachment, but remember registration is free!)

This method puts a checkbox prompt somewhere on the page. Each row in the list has a checkbox in it, clicking on that checkbox will perform a click event on the correct checkbox in the real prompt. There's a report expression to determine if the list checkboxes need to be checked on page load.

The JavaScript I used here isn't specific to Cognos, so upgrades shouldn't effect it, but I won't swear to it.

It uses the Go Sales (query) sample package.
Title: Re: List object as prompt
Post by: sir_jeroen on 25 Dec 2010 03:15:15 PM
What could work:
Add list to prompt page.
Set drillthrough to the report itself...


Title: Re: List object as prompt
Post by: rcoon on 12 Jan 2011 01:03:12 PM
Paul,

I've been offline since the holidays, and just saw your response now.  I will give the check boxes a try.  Thanks.

Also, the drill through solution mentioned would work as well, so I will look into that as well.

Thanks,
rob