COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: luka80 on 23 Apr 2009 09:36:11 AM

Title: Value Prompt hide header and separator
Post by: luka80 on 23 Apr 2009 09:36:11 AM
Hello Guys,

I have create a value prompt for select a year for report.
Example

Select Year                               
----------                                 
2006
2007
2008


Is possible hide 'Select Year' and '---------' ?

Thanks very muck :)

luca


Title: Re: Value Prompt hide header and separator
Post by: bloggerman on 23 Apr 2009 11:56:52 AM
Can be hidden using Java script

Title: Re: Value Prompt hide header and separator
Post by: luka80 on 23 Apr 2009 01:15:37 PM
Tnx bloggerman,
can u send me an example code?

i find this:
http://www-01.ibm.com/support/docview.wss?rs=0&q1=code+to+remove+the+first+two+lines+in+a+value+prompt&uid=swg21376360&loc=en_US&cs=utf-8&cc=us&lang=all (http://www-01.ibm.com/support/docview.wss?rs=0&q1=code+to+remove+the+first+two+lines+in+a+value+prompt&uid=swg21376360&loc=en_US&cs=utf-8&cc=us&lang=all)

but is wrong. Can u help me? Tnx very much.

Luca

Title: Re: Value Prompt hide header and separator
Post by: bloggerman on 24 Apr 2009 01:22:37 AM
document.forms["formWrapRequest"].elements["_oLstChoicesYear"].remove(0);
document.forms["formWrapRequest"].elements["_oLstChoicesYear"].remove(0);
Title: Re: Value Prompt hide header and separator
Post by: luka80 on 28 Apr 2009 11:26:09 AM
I found this solutions:
Javascript: Removing first 2 items from a value prompt in Cognos 8.3.

http://www-01.ibm.com/support/docview.wss?rs=0&uid=swg21342899 (http://www-01.ibm.com/support/docview.wss?rs=0&uid=swg21342899)

<script language="javascript">
var f = getFormWarpRequest();
var list = f._oLstChoicesPrompt1;

list.remove(1);
list.remove(0);
list.removeAttribute("hasLabel");
</script>

This code is correct and work in report but don't work when report is in a Page or in a Multi-Page.

There is a solutions? Thank's very much.

Luca


Title: Re: Value Prompt hide header and separator
Post by: sushmachowdary on 14 May 2009 01:23:33 AM
Thanks a lot luka80