COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Sridevi on 17 Jul 2009 02:46:22 AM

Title: Need to remove the data item name in the drop down prompt
Post by: Sridevi on 17 Jul 2009 02:46:22 AM
Hi,

Is there a way to ignore the data item name which is listed in the value prompt. We just need to list only the values of the column.

Thanks,
Sridevi
Title: Re: Need to remove the data item name in the drop down prompt
Post by: Gopinath on 17 Jul 2009 03:36:56 AM
Try placing the following script in a HTML item next to your value prompt.

<script>
var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);

fW._oLstChoicespromptname.remove(0);
fW._oLstChoicespromptname.remove(0);

</script>
Title: Re: Need to remove the data item name in the drop down prompt
Post by: Sridevi on 17 Jul 2009 04:16:47 AM
Thanks for the reply.

Can you please let me know what to you mean by "next to the value prompt".
Should I just use the script or do i need to made any changes , such as to include the prompt name anywhere in the below script


<script>
var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);

fW._oLstChoicespromptname.remove(0);
fW._oLstChoicespromptname.remove(0);

</script>
Title: Re: Need to remove the data item name in the drop down prompt
Post by: Gopinath on 17 Jul 2009 04:30:34 AM
Drag and drop a HTML item anywhere below your value prompt and copy/paste the script inside the HTML item.

Replace promptname in the code with your prompt name.
Title: Re: Need to remove the data item name in the drop down prompt
Post by: Sridevi on 17 Jul 2009 05:41:08 AM
I tried it...still the data item name is dispalyed in the drop down :-(

<script>
var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);

fW._oLstChoicesParameter1.remove(0);
fW._oLstChoicesParameter1.remove(0);

</script>

This is the script I pasted in the HTML item.

Thanks,
Sridevi
Title: Re: Need to remove the data item name in the drop down prompt
Post by: Sridevi on 17 Jul 2009 05:51:19 AM
Please find the attached sample code I am trying out

Title: Re: Need to remove the data item name in the drop down prompt
Post by: UseCog on 17 Jul 2009 06:03:50 AM
I think everything is set as said. You need to add the name of the prompt as 'parameter1' under miscellaneous.

let us know whether this is worked or not?
Title: Re: Need to remove the data item name in the drop down prompt
Post by: Gopinath on 17 Jul 2009 06:05:07 AM
You have to use the prompt name instead of the parameter name. Select your value prompt and specify a name under Properties --> Name

use the name in the code.
Title: Re: Need to remove the data item name in the drop down prompt
Post by: Sridevi on 17 Jul 2009 06:42:08 AM
Great it worked!! . Thanks a lot for your help.
:)