Resizing value prompt boxes in Cognos Report Studio

Thanks to the following site http://cognospaul.com/2012/01/10/quickie-dynamic-select-and-search-size/ for the follwoing.

To resize a value prompt insert a snippet of html before it with the following

<divid="selectSearch">

Then another html snippet afterwards with the code below

</div>

var e=document.getElementById('selectSearch');
var myselect = e.getElementsByTagName('select')[0];
if(myselect.childNodes.length>0){myselect.style.width=''}

This will then resize the element automatically within the page (just don’t ask me how)

Advertisements