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 on Cognos 8 REPORT PAGE

Started by cognos8_1, 06 Jul 2007 04:03:46 AM

Previous topic - Next topic

cognos8_1

I have been facing some issues while working on Javascript on my report pages. It works fine on the prompt page. Is this a bug ?

sir_jeroen

First give an explanation before shouting "bug"....

cognos8_1

 
Let me clearly explain the requirement 
1) I have a value prompt (drop down list) on my report page. Lets say, "P_Dim".
It has 3 static values - "product, product group, product type".

Now when I run my report, when I click on my value prompt (p_Dim), I could see parameter name appearing in the drop down menu along with a dotted line.

My requirement is that I shouldnt see this parameter name and dotted line. Once I click on p_Dim prompt, I should see only Product, Product Group, Product Type as drop down values.

I tried using Javascript, by dragging a HTML Item next to the prompt "p_Dimension" (UID=Dim) with the following code

<script>
document.forms["formWarpRequest"].elements["_oLstChoicesDim"].remove(0);
document.forms["formWarpRequest"].elements["_oLstChoicesDim"].remove(1);
}
</script>


This code gives required results on prompt page, but when tried with my report page prompt, it doesnt work. why so?


any help in this regard would be highly appreciated.

Thanks!!!


COGNOiSe administrator

Make sure your _oLstChoicesDim exists before your script executes.

shri

Try this

<script>
document.formWarpRequest._oLstChoicesDim[0].text = ' '
document.formWarpRequest._oLstChoicesDim[1].text = ' '
</scripts>

make sure you changed the name property of  Value Prompt to "Dim"