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

Removing message in Dropdown List

Started by kalyan_sekhar1, 27 Sep 2005 11:35:13 PM

Previous topic - Next topic

kalyan_sekhar1

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

otsizh

I think it posible in List Box
Multi select -> Yes

Desperado

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....

ultimatez

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>

ultimatez

I just realized that in theory you could also use javascript to remove the first two entries as well using similar code.

Desperado

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

kalyan_sekhar1

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.


asivaram_krishna

Kalyan,

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

thanks
siva

CoginAustin

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

kalyan_sekhar1

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

kalyan_sekhar1

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

sir_jeroen

Little reminder: close the topic if it's been solved (see board rules)