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

Saving report output obtained via the URL API's cognosViewer?

Started by bpetty, 26 May 2011 03:56:54 PM

Previous topic - Next topic

bpetty

Hey guys,

Is there a way to save the report output that you've received from the URL API?

For example, I am running a report like so:

String sURL = sGateway + "?b_action=cognosViewer&ui.action=run";
   sUrl += "&run.outputFormat=HTML";
   sUrl += "&ui.object=" + sEncodedObjectPath;
   sUrl += "&m_passportID=" + GetCAMPassport();


Everything is great except I am not sure how to implement "Save As" functionality that saves the results.  Somehow I need to get the path to the .MHT file when using the outputFormat of HTML, and likewise .PDF for PDF and XLS for Excel... is there some way to do this?

Again, user can run the report with the query above filling in all prompt pages and they do get the report back... but it is rendered in my embedded browser control and I want to give them the option to Save that run output.

bpetty

I don't think I can user the cognosViewer URL API to export a report to the file system since they don't expose a way to access that "session", only a way to get reports that are store in the Content Store.

Let me change the question:
If we switched over the Mashups is there a way to run a report, display the prompt pages in my embedded viewer, get the report back in HTML (I know only Cognos 10 supports HTML Paging) and THEN export that same report in different formats (without re-running it in the background).  I think this is possible via Mashups right?

Does anyone have an example of how this works?  Specifically, what you call to tell Cognos to export the report you just ran into MHT, for example.  I have even heard in a conference that C10 can export reports as PNG images... is that true?

Thank you guys!

nmcdermaid

I assume you could use the IE object model to submit the URL and save the result somewhere.