[英]how to add new line in ssrs expression between 2 numeric values
I tried to add a new line to a textbox to make the values appears like this:- 我试图在文本框中添加新行,以使值看起来像这样:-
I wrote the following expression:- 我写了以下表达式:
=FormatNumber(val(COUNTDISTINCT(Fields!YearMonth.Value)) ,Parameters!DecimalScale.Value,true,nothing,nothing) + VbCrLf + FormatNumber(Val(Sum(Fields!Amount.Value)),Parameters!DecimalScale.Value,true,nothing,nothing).ToString
but it returns the first value only not all the value and I also used 但它不仅返回所有值,而且返回第一个值,我也使用了
& vbcrlf &
and the same happens 同样的事情发生
I just tested your expression on my machine and it works fine. 我刚刚在我的机器上测试了您的表情,效果很好。 I tested this using the following query as the dataset: 我使用以下查询作为数据集对此进行了测试:
SELECT 'Emp 1' "Employee",201601 "YearMonth", 1000 "Amount" UNION ALL
SELECT 'Emp 1',201602, 1000 UNION ALL
SELECT 'Emp 1',201603, 1000 UNION ALL
SELECT 'Emp 2',201601, 1000 UNION ALL
SELECT 'Emp 2',201602, 1000 UNION ALL
SELECT 'Emp 2',201603, 1000 UNION ALL
SELECT 'Emp 3',201601, 1000 UNION ALL
SELECT 'Emp 3',201602, 1000 UNION ALL
SELECT 'Emp 3',201603, 1000 UNION ALL
SELECT 'Emp 4',201601, 10 UNION ALL
SELECT 'Emp 4',201602, 1 UNION ALL
SELECT 'Emp 4',201603, 2
You need to ensure that the text box property is set to CanGrow = True. 您需要确保将文本框属性设置为CanGrow = True。 To do this, select the cell, under properties navigate to CanGrow, and set to True. 为此,请选择单元格,在属性下导航至CanGrow,然后设置为True。
If it has been manually sized and CanGrow has been set to false, the data is there, just hidden as it cannot fit into the cell 如果已手动调整大小并将CanGrow设置为false,则数据在那里,只是隐藏了,因为它无法放入单元格中
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.