If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Dynamic default prompt option

Started by missspeedy23, 06 Jun 2016 11:14:17 AM

Previous topic - Next topic

missspeedy23

I have a requirement to create a report that will be used on a dashboard that will default to the data of the user that is logged on but will also allow them to change the user to a different one if required. The data item to obtain the user ID is set up in the framework but I'm struggling to set the report up so the prompt defaults to the particular user but allows it to be changed. I have seen some posts online that relate to dates and how to get around it but I'm struggling to relate this to my particular requirement.

Can anyone help?

Lynn

Relational or dimensional source? If relational, can you describe what your query filter expression looks like? Are you using session parameters? What do you mean by " The data item to obtain the user ID is set up in the framework"?

This particular session parameter returns the ID of the person logged in.


#sq($account.personalInfo.userName)#


I'm not clear on your particulars, but you can try something like this:

Create a prompt control with all the users and then add a static choice with a display value as "Current User" and a use value as #$account.personalInfo.userName# with this same use value set as the default value for the prompt control.

Next, add a filter to your query that uses a prompt macro surrounded with single quotes and specifies a prompt type of token. This will pass the use value across directly to be interpreted. Presumably there is a data item in your package that is the basis for filtering. I used the lower function around it to translate everything to lower case which may or may not be required depending on how your information is set up.


lower ( [Your Data User ID] ) = lower ( #sq ( prompt('User', 'token', '$account.personalInfo.userName') )# )


Hope this isn't on the wrong track but if you can answer the questions and provide more detail it might help improve responses.