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

Javascript Not Working in Cognos Viewer (v10.2)

Started by xplorerdev, 04 Feb 2013 07:48:31 AM

Previous topic - Next topic

xplorerdev

Hi,

I have a report which has two value prompts and 6 chart items. For the two value prompts, I have used the script available on the net to hide the parameter name and also hide the "--------".

Also, in place of the Finish button, I am using a hyperlink text having Report Expression of Case When statements.

The above report is working fine in Cognos Connection. Its loading in less than 5 seconds.

BUT, when I create a tab and then add a Cognos Viewer and then attach the same report in it, its NOT loading at all. It says "Your report is Running. Please wait."

Also, as an experiment, I added another list report to the viewer which had 5 columns. That's working! Strange..

Any idea as to why the chart report not showing up in the Cognos Viewer ?

Thanks n Regards
Dev

xplorerdev

Hi All,

I have now figured out the problem. It is the HTML code for the two prompts which are not allowing the report to run in portlet i.e. Cognos viewer.

I have the following code for the value prompts:

<script language="javascript">
var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() :
document.forms["formWarpRequest"]);
if ( !fW || fW == undefined)
       {
        fW = ( formWarpRequest_THIS_ ?formWarpRequest_THIS_ : formWarpRequest_NS_ );
       }

var objProductLine = fW._oLstChoicesuser;
objProductLine .remove(1);
objProductLine .remove(0);
objProductLine .removeAttribute('hasLabel');

</script>


Where user is the Parameter Name.

And I am now sure that this code is not working in portlet. Any workarounds? Any suggestions ?

Thanks n Regards
Dev

CognosPaul

#2
In order to get rid of the first two rows in the prompt, simply set the Header Text in the prompt properties to "Specified text" and click OK.

I think the introduction of the new prompt API may have resulted in a bug with JavaScript, because I've also seen this.

EDIT: Me grammar good not.

xplorerdev

Bingo !!  :)

That worked like a charm and now there is no javascript in my report. Cool. 8) Thanks a lot PaulM.

** Issue solved. Topic Closed **

Regards
Dev