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

Programmatically download .xls report output from Cognos

Started by chandra_report, 26 Feb 2011 01:23:09 PM

Previous topic - Next topic

chandra_report

Hi,

I need to download the .xls output of a report using Java. From the browser, it works as follows:

1. Execute Report by passing paramters (or prompts) required for the report using HTTP GET method.
E.g:

http://mycognos.com/cognos8/cgi-bin/cognosisapi.dll?b_action=cognosViewer&ui.action=run&ui.object=[report-path]&ui.name=[report-name]&run.outputFormat=XLS&p_inputParam=1,2,3&run.prompt=false

2. The above url generates the report and then opens up a new tab from where I am able to download the .xls report output successfully.

URL fired in this step looks like:

http://mycognos.com/cognos8/cgi-bin/cognosisapi.dll/gd/H4sIAAAAXBMQ6DMAwF0LswwRDJP3Ycm07QpFKPEQKVOiGV3l*8B8Ker5Kjcw9m0oJDsACM0Pet6Sdu6j3O5Dk6qREe1--8HAeyDt-Mz5fDVRZKon6seUmrGCrZCGcbDdAMezSXwYAAAAA__/

The above works fine when I am doing this from a browser. But when I have to do this programmatically, I am facing issues with step 2, as the step 2 URL is a random (or on-the-fly) generated url.

Does anyone know how to achieve this - downloading Cognos report outputs programmatically?

Thanks in advance!

Sunchaser

Hi,

I would tend say that it depends on if it is an interactive or background activity.
For the first assumption, you can imagine open a browser with the first URL, or programmatically open a browser on a page containing some HTML/JS and a FORM within, then you pass to it all required elements (URL to report & parameters) and then submit the FORM.
If it is a kind of background activity, then you will have the solution of using SDK, as there are example like programmatically running a report and then sending it per email or saving it on a dedicated folder for example.
But in this case, it depends too on license you have (license for SDK).

Hope it helps,
vinc.