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

Export Cognos prompt to a file

Started by anjan, 08 Nov 2012 07:20:19 AM

Previous topic - Next topic

anjan

Hi All,

There is a requirenment, where in prompt value needs to be export to file and which can be loaded back to report so that report can be run.


Thanks,
Anjan K

CognosPaul

If I understand correctly.

You're asking for a solution where you have, lets say, 30 prompts on the page. The user would select all of the values he wants, then press a button which would generate a csv containing his selections. Later, when the user wants to rerun the report, he opens the report, presses another button, selects the csv he saved before, and it would automatically set the prompts.

This should be possible using JavaScript, the new Prompt API, and a significant amount of time. I've done this before for a client, but I can't touch that code. Writing the code to actually do this would probably take anywhere between 10-30 hours to get it working to the point where you could just copy/paste it in to any report.

Since I don't have that kind of free time, the best I can do is point you in the right direction. Use the new prompt api to get a list of the prompts on the page. Loop through them getting the names and values. Export the results to a csv with the data uri. Use the UCSV library to make loading and reading the csv easier. Use the prompt api again to set the prompts.