Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditionally Hiding Prompts 1

Status
Not open for further replies.

sukmis

Programmer
Mar 7, 2009
2
EU
Hi - trying to hide a couple of prompts based on users membership to a cognos group. eg if user belongs to group "ABC" then show 2 prompts otherwise show no prompts. I have put these 2 prompts in a conditional block and have tried to render the block based on a boolean (which determines if user belongs to a group or not). Here is my boolean expression:
If([Query1].[UserDetails] Contains 'NE EUROPE USERS') THEN
'Yes'
ELSE ('No')
where [Query1].[UserDetails] = #sq(CSVIdentityNameList ())#...it does not work...any ideas why? Thanks for reading!
 
Problem was that scope of the ([Query1].[UserDetails] data item was not at page level. Also I found it easier to add the prompts to tables for rendering - seemed to work better than conditional blocks.
 
You could use conditional rendering I believe to solve this problem. If you have access to the Cognos training manuals I think it is in the 2nd book about 3/4 the way through it.
You use conditional rendering with Blocks that you drag from the toolbox onto the page, then use a boolean variable to show or not show the object. Once the variable is setup then you perform the conditional rendering by setting up an ansestor to the object. You have to go through several steps to accomplish this, but it's really cool, you can even conditionally show or not show a page just by setting up the ansestor to be the page rather than say another object. Sorry for not giving you a detailed line by line process, but the manual is at work and I'm home right now, and there is not a short sweet answer that I can think of. If someone doesn't post on this message I'll post a more detailed process this weekend.

Take care,

DataMinky
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top