COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: dougp on 08 Nov 2021 11:55:47 AM

Title: Select & Search Prompt: Size & overflow
Post by: dougp on 08 Nov 2021 11:55:47 AM
I don't see a size & overflow property for the select & search prompt.  Am I just missing it?  I see in one of my old reports I used old-style HTML and JavaScript to overcome this.  To control the size of a select & search prompt, must I use a Page Module or Custom Control?
Title: Re: Select & Search Prompt: Size & overflow
Post by: CognosPaul on 09 Nov 2021 09:06:31 AM
You don't actually need either.

Try this, create a block with the name "mySNS" and drag your search prompt into it. Set the width of the block to something like 800px.

Next add an HTML item to the report:
<style>
div[lid=mySNS] div[specname=selectWithSearch] {
    width: 100%;
}

div[lid=mySNS] div.clsPromptSelectWithSearchControlArea,div.clsPromptSelectWithSearchMultiSelPane{
  width:50%;
}
</style>


That will make the search prompt expand to the width of the block.
Title: Re: Select & Search Prompt: Size & overflow
Post by: dougp on 09 Nov 2021 11:03:26 AM
As always:  Masterful, sir.  I often forget CSS is a great option for working with Cognos reports.

Since I'm using a single-select, setting the second width to 100% worked better for me.