I wonder if anybody knows which DOM property drives the actual *action* URL (where report's form will be posted).
I need to optionally call an ASP.Net page with some SDK code from report prompt page. One way I found is to use CognosLaunch.js and supply my ASP URL as a gateway. Problem is I need to go around the prompts and collect all parameters before passing them to CognosLaunch (wish I could loop through some prompt collection, can I?).
Alternatively, I thought if I can make the page to be submitted to my ASP instead of ***cognos.cgi, then I'll automatically get everything I need.
So far I tried fiddling with:
document.formWarpRequest_NS_.action
window.oCV_NS_.sGateway
window.oCV_NS_.ms_Gateway
window.oCVSC_NS_.m_oCognosViewer.envParams['ui.gateway']
but the report still goes to cognos gateway instead of my custom URL.
Apparently, it's not documented and I am shooting in the dark, but still, may be someone knows?
on a second thought, it seems like I can dynamically collect all prompt page parameters and send them off to cognoslaunch, but posting the prompt page right into the asp.net would be a bit more elegant.
var oCR = cognos.Report.getReport("_THIS_"); // ger Report object
var oP = oCR.prompt; // get Prompt object
var oPC = oP.getControls(); // get collection of the user parameters
for (i=1; i<oPC.length; i++)
{
alert( oPC[i].getName() + " -> " + oPC[i].getParameterName());
}