Question

Actually I'm working on Cognos 10.1 . I have three prompts (Value prompt) in my report. All the prompts are optional. Based on the selections I wanna show the results. Each prompt corresponds to a column in the list. If the value is chosen in the prompt, it has to show the column. Else, it has to hide the column. We should not use conditional blocks or style variables. Please help me. Thanks in advance.

Was it helpful?

Solution

Yes - Here is how i did this before. I created a prompt page that allowed the user to pick the columns they wanted on the report via check boxes(true/false). Each check box represented a unique parameter name associated with a column you later want visible or invisible.

On the report page, the default state of the list shows all the possible columns. In order to conditionally hide the columns i created a Conditional Style(one for each column) and associated that with the list column/cell. The conditional style basically says hey if my param was not chosen false then set the "box-type to none which means it will not be rendered at all.

You do have to create a conditional style for each column, but when trying to make something flexible/dynamic and easy for the user its worth it. Mine also allowed dynamic sorting/grouping(up to 3 levels) for the same set of columns)

Thanks,

Tim

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top