简体   繁体   English

如何更改SSRS中参数下拉框的宽度?

[英]How do I change the width of parameter drop down box in SSRS?

Is there a way to control the size of the parameter drop down box? 有没有办法控制参数下拉框的大小? In my current drop down 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. 提前致谢。

This is a frequent complaint. 这是一个经常抱怨。 There is no simple way to control the parameter interface, such as changing the width of the boxes. 没有简单的方法来控制参数界面,例如更改框的宽度。 You might be able to hack the html with some JavaScript. 您可以使用一些JavaScript来破解html。 Or you can go full-on and build your own interface to collect the parameters and then call the SSRS report, either via web services or URL access. 或者,您可以全面开发并构建自己的界面来收集参数,然后通过Web服务或URL访问调用SSRS报告。

What I have found to work was use the LEFT function to set the length of the field. 我发现工作的是使用LEFT函数来设置字段的长度。 In my situation the description column of my parameter (Program Type) was defined as varchar(200) so the dropdown drawn was very wide. 在我的情况下,我的参数(程序类型)的描述列被定义为varchar(200),因此绘制的下拉列表非常宽。 When I changed the SQL to SELECT ProgramID, LEFT(Description, 25)... the dropdown was a better size, and the majority of the descriptions are less than 25 characters anyway. 当我将SQL更改为SELECT ProgramID时,LEFT(描述,25)......下拉列表的尺寸更好,而且大多数描述都少于25个字符。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM