none
Width of parameter drop down box

    Question

  • Hi,

    May I know is there a way to control the size of the parameter drop down box? In my current box, the width increase according to the option with label of the longest length, in which causes my report's width to increase out of my control.

    Thanks in advance!

    Tuesday, February 28, 2006 9:50 AM

Answers

  • You cannot change the width of the parameter box.  Any solution that attempts to use the control ID as a work around is brittle and is likely to break when you install a service pack or hotfix, or almost certinaly when you upgrade to a new major version. 

    If you need control over the parameters UI, you can use the Report Viewer control that ships with Visual Studio to build a custom management UI and your own custom parameters area. 

    Hope that helps,
    -Lukasz


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, April 01, 2009 4:25 PM
    Moderator

All replies

  • Hi,

    We can get use of style files for customizing the view of reporting services standart user interfaces

    If you want to customize SELECT control, change the .css file named htmlviewer.css in the folder /styles in ReportServer virtual directory.

    You can see the customization for SELECT as well as others as below in htmlviewer.css file

    .PageNumberText, INPUT, BUTTON, SELECT, TABLE, BODY, FRAMESET
    {
        font-size: 8pt;
        font-family: Verdana
    }


    If you change it as below, by removing SELECT

    .PageNumberText, INPUT, BUTTON, TABLE, BODY, FRAMESET {
        font-size: 8pt;
        font-family: Verdana
    }

    and then add a style only for SELECT with the width attribute declared, you will be able to set the parameter dropdown width

    SELECT {
        font-size: 8pt;
        font-family: Verdana;
        width:200px
    }



    Eralper
    http://www.kodyaz.com

    Tuesday, February 28, 2006 2:45 PM
  • Hi,

    Thanks for your information.

    I have followed ur instructures and modified the htmlviewer.css located at

    Program Files\Microsoft SQL Server\MSSQL 3\Reporting Services\ReportServer\Styles

    and then I have restarted the Report Server.

    However, there has no changes in the parameter select box.

    Is there any steps I need to do before things can work?

    Thanks.

    Wednesday, March 01, 2006 3:58 AM
  • Hi,

    I found that if I follow the link to the css file from the html source (link href="/ReportServer?rs:command=StyleSheet&Name=SP_Full&Version=2005.090.1399.00), the returned css is the old version befor I did any changes.

    Is the css file cached somewhere?

     

    Looking forward for any advice. Thanks.

     

    Friday, March 03, 2006 9:11 AM
  • Did you ever find a work around / solution to this issue ?

    Stopping / restarting the Reports Server does not solve this...

     

    Thanks In Advance

    Tuesday, June 05, 2007 9:29 PM
  • Hello,

     

    Are you sure that you configured your Report Server to use your custom style sheet?

     

    You need to declare the name (without the ".css") of your file in the RSReportServer.Config file, under the "configuration" tag.

     

    Example :

     

    <HTMLViewerStyleSheet>HtmlViewer</HTMLViewerStyleSheet>

     

    Let me know if it was the problem.


    Note that you don't need to restart your Report Server when you make an update in a CSS file !!

     

     

    Thursday, August 09, 2007 9:55 AM
  • Thursday, August 09, 2007 9:57 AM
  • The width changed successfully after I updated the rsreportserver.config. Thanks a lot!
    Monday, August 13, 2007 9:43 AM
  • Hi,

     

    I've tried this solution but I can't seem to get it to work. Where do I place the SELECT in the css file, and do I need to modify it in anyway?

     

    SELECT {
        font-size: 8pt;
        font-family: Verdana;
        width:200px
    }

    Thanks,

    David

    Monday, September 10, 2007 4:49 AM
  • I noticed that this works for the selction dropdown, i.e. export format, but I can't seem to get to work for the parameter selections. Any suggestions?

     

    Thanks,
    David

    Tuesday, September 11, 2007 9:04 PM
  •  

    Eralper,

     

    This works with SELECT with no multiselect. I could able to increase the width of all dropdown lists.

    But when i make multiselect=true in Report->Report Parameter-->Then it does not work.

     

    Is there ay workaroung for this. Thanks in advance.

    Thursday, June 19, 2008 1:21 PM
  • Hi Shashu,

    I discuss a method by which you may increase the size of this dropdown here.  The post addresses reports generated via the ReportViewer control, but I discuss how it may be applied to the Report Manager system in the comments section.

    Note that this solution utilizes the internal control structure of the ReportViewer and, as such, is (i) unsupported and (ii) likely to break with future releases.  However, since the problem has persisted for such a long time, I feel that the hack is warranted.

    Hope this helps!

    Brandon

    Friday, December 19, 2008 2:07 PM
  • A static CSS solution involves:

    1. Deploy report as is and view in browser
    2. View source and locate the control id (Ex. ReportViewerControl_ctl00_ctl07_txtValue). You can usually find the control by searching for the parameter caption text.
    3. Ensure the <HTMLViewerStyleSheet>HTMLViewer</HTMLViewerStyleSheet> is in rsreportserver.config.
    4. Add an 'id' targeted CSS entry in HTMLViewer.css like the following: #ReportViewerControl_ctl00_ctl07_txtValue { width: 500px }

    Friday, February 27, 2009 5:02 AM
  • You cannot change the width of the parameter box.  Any solution that attempts to use the control ID as a work around is brittle and is likely to break when you install a service pack or hotfix, or almost certinaly when you upgrade to a new major version. 

    If you need control over the parameters UI, you can use the Report Viewer control that ships with Visual Studio to build a custom management UI and your own custom parameters area. 

    Hope that helps,
    -Lukasz


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, April 01, 2009 4:25 PM
    Moderator

  • Hi DW-DW

    i am a little sketchy on this details
    4. Add an 'id' targeted CSS entry in HTMLViewer.css like the following: #ReportViewerControl_ctl00_ctl07_txtValue { width: 500px }

    i added this line

    #ReportViewerControl_ctl161_ctl00_ctl13_ctl00
            {
            width: 500px !important;
            }


    which is the correct ID of the multi select parameter
    but nothing changed.

    Wednesday, January 20, 2010 10:26 PM