Report studio : Removing Parameter Name from Value Prompts
This has been covered in numerous mails, sites and posts. I am including the same here for the benefit of those who visit and use the site for all their JavaScript needs.
By default Single Select Value Prompts, display the Query Item Name as the first item in the drop down and the second item is a dotted line.
To remove the first 2 lines of value prompts follow the steps below:
Name the value prompt as PL.
Insert an HTML item below the prompt and include the below script:
<script>
var fW = (typeof getFormWarpRequest == "function" ?getFormWarpRequest() : document.forms["formWarpRequest"]);
if ( !fW || fW == undefined)
{ fW = ( formWarpRequest_THIS_ ?formWarpRequest_THIS_ : formWarpRequest_NS_ );
}
var objProductLine = fW._oLstChoicesPL;
objProductLine .remove(1);
objProductLine .remove(0);
objProductLine .removeAttribute('hasLabel');
</script>
The first 2 lines in the value prompt are now removed.
By default Single Select Value Prompts, display the Query Item Name as the first item in the drop down and the second item is a dotted line.
To remove the first 2 lines of value prompts follow the steps below:
Name the value prompt as PL.
Insert an HTML item below the prompt and include the below script:
<script>
var fW = (typeof getFormWarpRequest == "function" ?getFormWarpRequest() : document.forms["formWarpRequest"]);
if ( !fW || fW == undefined)
{ fW = ( formWarpRequest_THIS_ ?formWarpRequest_THIS_ : formWarpRequest_NS_ );
}
var objProductLine = fW._oLstChoicesPL;
objProductLine .remove(1);
objProductLine .remove(0);
objProductLine .removeAttribute('hasLabel');
</script>
The first 2 lines in the value prompt are now removed.
Note: This technique uses JavaScript against underlying report objects in a IBM Cognos 8 BI report. For this reason, there is no guarantee that reports created using this technique will migrate or upgrade successfully to future versions without requiring modifications. Any such modifications are the responsibility of the report designer.
No comments:
Post a Comment