Friday, November 19, 2010

How to hide Select All in cognos8

1)How to hide Select All | Deselect All for all prompts in the prompt page for 8.3:

 For this consider the following prompt page where the user hasto give the product prompt  as a f
<SCRIPT LANGUAGE="JavaScript">;
// hiding select All/deselect All in Cognos 8.3 form.
for(j=0;j<document.links.length;j++)
{
y=document.links[j];
if (y.id.indexOf("SELECT") != -1) document.getElementById(y.id).style.display='None';
}
</script>

2) To hide Select All | Deselect All for the second prompt only in a prompt page with two prompts for 8.3:
<SCRIPT LANGUAGE="JavaScript">
// hiding select All/deselect All in Cognos 8.3 form.
for(j=0;j<document.links.length;j++)
{
y=document.links[j];
if (j==2 || j==3)
{
if (y.id.indexOf("SELECT") != -1) document.getElementById(y.id).style.display='None';
}
}
</script>
Note: The values for the "j" variable for the if (j==2 || j==3) statement above represent the 3rd and 4th link in the two prompt multi-select prompt page. The first and second link would be referenced with a value of j=0 and j=1. 

No comments:

Post a Comment