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

Java Script to save prompt values specific to user.

Started by cognos05, 27 May 2014 01:54:17 PM

Previous topic - Next topic

cognos05

Hi All,

My report users will be using cognos workspace. So I create one report in report studio and create one workspace dashboard and use this report in it.

The issue is this dashboard is accessed by several users and this dashboard is saved as one single instance and not specific to user.

So if one user saves one prompt value and other user logs in he sees the same value selected.

I researched a bit and understood the only solution is to write a javascript and save the prompt values specific to users and dispaly them on their next visit.This would work if they are using same browser.

Does anyone has a sample java script code for the above scenario.

I appreciate your help.

Thanks,
Nithya

cognos3

Quote from: nithya1224 on 27 May 2014 01:54:17 PM

Did you find the answer to above question?

Hi All,

My report users will be using cognos workspace. So I create one report in report studio and create one workspace dashboard and use this report in it.

The issue is this dashboard is accessed by several users and this dashboard is saved as one single instance and not specific to user.

So if one user saves one prompt value and other user logs in he sees the same value selected.

I researched a bit and understood the only solution is to write a javascript and save the prompt values specific to users and dispaly them on their next visit.This would work if they are using same browser.

Does anyone has a sample java script code for the above scenario.

I appreciate your help.

Thanks,
Nithya

yossiea

Using the prompt api's you can save prompt values in cookies and then have a button to fetch the values.

cognos3

Can you please explain the process in detail?

CognosPaul

The Prompt API Samples has an example of saving the prompts to a cookie. There is a function that loops through all of the prompts on the page, saving the selected values in JSON text and storing that as a cookie. I've published a technique which allows you to save to a local file: http://cognospaul.com/2014/08/07/splendiferous-news-saving-prompts-local-file/

And I also have an unfinished technique which saves to a table in a database and is automatically retrieved when the page loads. The only outstanding issue I have is finding a decent way of providing a way of having the prompts default to the selected values.

All that being said, I have NO idea how any of it will work with Cognos Workspace, and how the Prompt API plays with the new C11 interactive reports.

rockytopmark

What about using report views, where each user has their own report view of the dashboard (in their My Folder, or some distinguishable user folder setup in Public), where they can save their desired parameters without affecting others?

cognos3

Thank you Paul and rocky and sorry for the delayed response.

I am trying to apply your method but stuck at Opensave button download because the website you referred is blocked by my company. 
I am also curious about the method where you save prompt values in a cookie. I found the related IBM link but not able to see the report. Can you please provide the sample report for Cookie method if possible.

Thank you!!

cognos3

The third technique also sounds good to me. Hope you find a solution soon :) .