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

Increase width of Select & Search Prompt

Started by Steve, 23 Feb 2011 04:54:41 PM

Previous topic - Next topic

Steve

For a Select & Search prompt, is it possible to increase the width? I don't see the size and width property. I tried this in an HTML item but didn't work:

<script type="text/javascript">
<selectValue parameter="pAgency" refQuery="pqAgency" multiSelect="false" required="true">
<useItem refDataItem="Agency"/><style><CSS value="width:700px"/></style></selectValue>
</script>

Can we increase the width of the Prompt?

Thanks !

Shailaja0520

#1
Just try this..worked in 8.2 version

<script>
v = document.forms["formWarpRequest"].elements["_sws_<parameter name>_selectChoices<prompt name>"];
v.style.width=500;
</script>

or if you want a permanent solution-

get the properties.js file located in ..\c8\webcontent\prompting

Set
var SYSTEMPROPERTY_CSEARCH_AUTO_RESIZE_RESULT_LIST = true;

it will dynamically resize the prompt.

cognostechie

You can also try this:

1- Put two HTML items around the prompt (The Prompt should be between these two HTML items)

1st HTML - <DIV id="myTextBoxPrompt">

2nd HTML - </DIV>

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

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

Steve

Suhan - Thanks for the suggestion. I am on 8.4 and both of them didn't work. Maybe the versioning issue !

Cognostechie - That worked. Thanks !

Shailaja0520

get the properties.js file located in ..\c8\webcontent\prompting

Set
var SYSTEMPROPERTY_CSEARCH_AUTO_RESIZE_RESULT_LIST = true;

it will dynamically resize the prompt.

This is working in 8.4

igorcom93

Good day,
Could you kindly advise how to solve the following problem.
I have value prompt and I need to use property Size and Overflow (130x30). It its important because the report layout should be static.
But at the same time I want to make my drop-down list wider. I have the values which are cut. It is an issue.
I have used the previous javascript. But it changes the layout (value prompt becomes wider too but i want only drop-down list does)