Tricksy Parameter Prompts
Q: How to make the darn parameter drop-down list wider in HTMLViewer? HTMLViewer is the Report Manager control that displays the report when you view the report.
A: HTMLViewer supports limited customization via a CSS stylesheet.
- Copy HTMLViewer.css to MyHTMLViewer.css in the same folder (Reporting Services\ReportServer\Styles). Note that the actual folder path varies between SQL Server versions.
- Add the following CSS style to MyHTMLViewer.css
SELECT {
font-size: 8pt;
font-family: Verdana;
width:200px
}
As a result, all SELECT elements on the page (all dropdowns, such as parameter prompts, zoom, export) will pick up these settings.
- Configure the server to use the custom stylesheet by one of these options:
- If you want to apply the custom styles to all reports, add a new HTMLViewerStyleSheet element to the rsreportserver.config file, such as:
<Configuration>
…
<HTMLViewerStyleSheet>MyStyleSheet</HTMLViewerStyleSheet>
…
</Configuration>
Note that due to an unfortunate bug, the HTMLViewerStyleSheet setting doesn’t work with February CTP of SQL Server 2008 but it will be fixed in the final release.
- Use the rs:Stylesheet device setting to apply the custom style to given report only, such as:
http://localhost/ReportServer?/AdventureWorks Sample Reports/Product Line Sales&rs:Command=Render&rc:Stylesheet=MyStylesheet