COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Topic started by: kalyan_sekhar1 on 27 Sep 2005 11:35:13 PM

Title: Removing message in Dropdown List
Post by: kalyan_sekhar1 on 27 Sep 2005 11:35:13 PM
Hi,

In Report i have a drop down which populates years, the dropdown shows like the below

Year
-------

2002
2003
2004
2005



How do i remove the

Year
------

from the dropdown list ?

Thanks
Title: Re: Removing message in Dropdown List
Post by: otsizh on 28 Sep 2005 07:44:00 AM
I think it posible in List Box
Multi select -> Yes
Title: Re: Removing message in Dropdown List
Post by: Desperado on 28 Sep 2005 08:45:06 AM
I think this in not of much use. we just want to hide or remove year and ----- from the drop down .We don't want to use multi select= yes, as it  will not make it a drop down....
Title: Re: Removing message in Dropdown List
Post by: ultimatez on 28 Sep 2005 01:30:14 PM
I haven't been able to find this either.  The best we have come up with is to preselect the first value using javascript.  Replace the cboClientNum below with ID of your drop down.  Also, the last checkData command will autosubmit if you need.

<script language="javascript">
if (document.forms["formWarpRequest"].elements["_oLstChoicescboClientNum"])
{
if (document.forms["formWarpRequest"].elements["_oLstChoicescboClientNum"].length == 3 &&
document.forms["formWarpRequest"].elements["_oLstChoicescboClientNum"].selectedIndex == 0 )
{
document.forms["formWarpRequest"].elements["_oLstChoicescboClientNum"].selectedIndex = 2;
setTimeout('listBoxcboClientNum.checkData()', 10);
}
}
</script>
Title: Re: Removing message in Dropdown List
Post by: ultimatez on 28 Sep 2005 01:32:09 PM
I just realized that in theory you could also use javascript to remove the first two entries as well using similar code.
Title: Re: Removing message in Dropdown List
Post by: Desperado on 29 Sep 2005 12:14:31 AM
Can u plz explain me in detail , where and how to use this script ? And in my case it is year and ---- that are to be removed...

Thanks in Advance
Title: Re: Removing message in Dropdown List
Post by: kalyan_sekhar1 on 02 Oct 2005 04:24:04 AM
Apply that in HTML Item, which you canfind in toolbox. Place the HTML item in desing area and in properties loook for HTML , open the window and copy the code there.

Title: Re: Removing message in Dropdown List
Post by: asivaram_krishna on 03 Oct 2005 09:18:34 AM
Kalyan,

We dont have a provison to remove this
i spoke with cognos support  for this
They are working on this

thanks
siva
Title: Re: Removing message in Dropdown List
Post by: CoginAustin on 06 Oct 2005 09:21:26 AM
Cognos just posted a way to do exactly what you are wanting

Removing the Default Parameters from a Cognos ReportNet Drop Down List
http://support.cognos.com/supported/supportlink/15n4/hottip06.xml
Title: Re: Removing message in Dropdown List
Post by: kalyan_sekhar1 on 06 Oct 2005 09:23:57 PM
Thanks, the article is good. Provides the info that i am looking for. Before i proceed to changes the status of post to "Solved", can i know on how the namings are defined for different elements in the report net.

For eg: DropdownList is called as "_oLstChoices[elementname]" ,how do i know the names of other form elements like TextBox, Lables .....

Thanks
Title: Re: Removing message in Dropdown List
Post by: kalyan_sekhar1 on 06 Oct 2005 10:01:10 PM
YUP, PRoblem Solved. To view the control names.... Run the Report and check the view source and go to the apropriate ID. you will see the names with reportnet notations. If you want to refer the elements from the javascript need to use these names


Thanks to all. Issue is solved
Title: Re: Removing message in Dropdown List
Post by: sir_jeroen on 07 Oct 2005 02:07:17 AM
Little reminder: close the topic if it's been solved (see board rules)
Title: [SOLVED] Removing message in Dropdown List
Post by: kalyan_sekhar1 on 07 Oct 2005 03:33:24 AM
SOLVED