SQL Server 2008 报告服务
我正在尝试生成矩阵报告。我有一个 SSN 行和一个 3 位数代码列。 3 位代码随机插入整个报告的单元格中,每行一个。我想让它们全部显示在一列中。我已经尝试过......
=Iif(IsNothing(Fields!CODE.Value),"The Field Is Null",Fields!CODE.Value)
但这只是显示“该字段为空”。我希望注释显示为...
=Iif(IsNothing(Fields!CODE.Value),"",Fields!CODE.Value)
但将空单元格本身排除在外。有人知道解决这个问题的技巧吗?
结果看起来像这样......
ssn code
123456789 123
123456789 123
and so on
我的矩阵结构看起来像这样......
并且 Exp 现在设置为 =Iif(IsNothing(Fields!ID5.Value),"The Field为 Null",Fields!ID5.Value) 注意:ID5 只是一个快速命名约定。 ID5对应代码。 ID2 对应于 SSN。
I'm trying to generate a matrix report. I have an SSN row and a 3 digit code column. The 3 digit codes are randomly inserted into cells through out the report, one per row. I would like to have them display all in one column. I have tried...
=Iif(IsNothing(Fields!CODE.Value),"The Field Is Null",Fields!CODE.Value)
But this just displays "The Field is Null". I want noting displayed as in...
=Iif(IsNothing(Fields!CODE.Value),"",Fields!CODE.Value)
But have the null cells themselves excluded. Anyone know a trick to pull this off?
the result would look like this...
ssn code
123456789 123
123456789 123
and so on
My matrix structure looks like this...
and the Exp is now set to =Iif(IsNothing(Fields!ID5.Value),"The Field Is Null",Fields!ID5.Value)
Note: The ID5 is just a quick nameing convention. ID5 corresponds to the code. ID2 corresponds to the SSN.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
基本上,您想将几列压缩为一列(不包括空列)?
也许最简单的方法是在查询中执行此操作:
或者,在 Reporting Services 中的表达式中执行此操作:
等等...
Basically, you want to compress several columns into one column excluding the null columns?
Probably the easiest way is to do it in the query:
Alternatively, do it in the expression in Reporting Services:
and so on...