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

Is there any way to increase the size of select & search prompt

Started by yoursmani, 21 Apr 2009 12:05:43 AM

Previous topic - Next topic

yoursmani

Hi All,

I have a select & search prompt in my prompt page. The values loaded in this prompt are of charecters with more than 100 in length and the values are not visible to full extent.

Is there any way to increase the size of this prompt but i found for other prompts value, text box we have size and overflow property under positioning but not for select & search prompt.

I knew that this can be achived globally by doing changes in toolbar.xml but is it possible to do it in the report studio as my crieteria here is only for 3 reports.

Thanks,
Mani.

bobj

Hi,

Try using these steps:

1- Open an empty report with any package ( we will only create prompt page with 'Search and select' prompt)

2- Create a prompt page and put a 'HTML' item , 'Search and Select' prompt and antoher 'HTML' item ( Prompt should be between 2 'HTML' item).

3- Set 'Multiselct' property to 'No' for prompt

4- Open first 'HTML' item an type

<DIV id="myTextBoxPrompt">

5- Open second 'HTML' item and put

</DIV>

6- Put another 'HTML' item after 'Finish' button on the prompt page

7- copy and paste folowing javascript( within <script> </script> tags inculding these tags):

<script>
function getObject(obj, type)
{
// step through all child elements of obj and look for an id that starts with 'type':

for (var i = 0; i < obj.all.length; i ++)
{

if (obj.all !=null && obj.all.id != null) {
if ( obj.all.id.indexOf(type) !=-1)
{
return obj.all.id;
}
}
}
}

// making choice box wider
var myDiv = document.getElementById("myTextBoxPrompt");
var div = myDiv.firstChild;
var selectNode = getObject(div,"PRMT_SV_N");
var mySelectNode = document.getElementById(selectNode);
mySelectNode.style.width='500';

</script> ...

dumbell

A little better version that worked perfectly for me.
Hope this works for you..
Thanks for the initiative bobj..

----

Html items handles of the prompt

1)<DIV id="myTextBoxPrompt">
2)</DIV>

3rd Html item next to last button on the prompt page

<script>
var theDiv = document.getElementById("myTextBoxPrompt");
// find all the children of the DIV
for (i=0; i < theDiv.childNodes.length; i++)
{
// find the select TAG and set the size attribute
var node_list = theDiv.childNodes.getElementsByTagName('SELECT');
for (var j = 0; j < node_list.length; j++)
{
node_list[j].style.width='auto';
node_list[j].style.height='auto';
}
}
</script>
------

kado

Would the JS look different for 8.4? I tried adding the 3 HTML items mentioned above and didn't notice a difference at all.

-thanks-


rockytopmark

Change (or add) the last 3 lines to the script to also change the width of the "selected" box on the right of the control:

//selected box (rightside) sizing
var selectNode = getObject(div,"PRMT_LIST_BOX_SELECT_N");
var mySelectNode = document.getElementById(selectNode);
mySelectNode.style.width='300';