COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: myersmar on 15 Nov 2010 10:50:03 AM

Title: Removing title/dotted line from value prompt when rerunning a report
Post by: myersmar on 15 Nov 2010 10:50:03 AM
I need to remove the title and dotted line from a value prompt. I have the following Javascript in an HTML Item to do it:

<script>
var f = getFormWarpRequest();
var prompt = f._oLstChoicesX;
prompt.remove(1);
prompt.remove(0);
prompt.removeAttribute("hasLabel");
</script>

Note1: "X" is the name of the prompt specified in the value prompt properties.
Note2: I'm using Cognos 8.4 Report Studio

This script works perfectly the first time I run the report however, it only works the first time. If I rerun the report the title and dotted line reappear. Any suggestions to eliminate them as well on a rerun?

TIA,
Marcia
Title: Re: Removing title/dotted line from value prompt when rerunning a report
Post by: bioCam on 16 Nov 2010 03:07:48 PM
Try this ..

<script language="javascript">

//your Value Prompt is your first Select object, if its the 2nd, change
Title: Re: Removing title/dotted line from value prompt when rerunning a report
Post by: peritas-chris on 17 Nov 2010 11:38:49 AM
Isn't it great that Cognos 10 makes this easy now?  It's just a property of the prompt object!
Title: Re: Removing title/dotted line from value prompt when rerunning a report
Post by: bloggerman on 17 Nov 2010 10:12:26 PM
Awesome. Haven't seen 10 yet, but,sounds great.Script to do such trivial stuff was annoying.