Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reporting services 使用Sql Server Reporting Services中的行值填充列_Reporting Services_Ssrs Tablix - Fatal编程技术网

Reporting services 使用Sql Server Reporting Services中的行值填充列

Reporting services 使用Sql Server Reporting Services中的行值填充列,reporting-services,ssrs-tablix,Reporting Services,Ssrs Tablix,我有一个数据集,有两列,分别是Row和Title。这个数据集中有8行,我想在表的列中显示这8个标题。因此,我创建了一个包含8列的表,并将每列的表达式设置为 =LookUp(Fields!Row.Value,1,Fields!Title.Value,"Titles") =LookUp(Fields!Row.Value,2,Fields!Title.Value,"Titles") =LookUp(Fields!Row.Value,3,Fields!Title.Value,"Titles")

我有一个数据集,有两列,分别是Row和Title。这个数据集中有8行,我想在表的列中显示这8个标题。因此,我创建了一个包含8列的表,并将每列的表达式设置为

=LookUp(Fields!Row.Value,1,Fields!Title.Value,"Titles")    
=LookUp(Fields!Row.Value,2,Fields!Title.Value,"Titles") 
=LookUp(Fields!Row.Value,3,Fields!Title.Value,"Titles") 
.
.

但是,只有第一列显示标题。其他7个没有显示任何内容。我的表达式错了吗?

实际上,您只需要反转
查找表达式中的前两个参数:

=LookUp(1,Fields!Row.Value,Fields!Title.Value,"Titles")    
=LookUp(2,Fields!Row.Value,Fields!Title.Value,"Titles") 
=LookUp(3,Fields!Row.Value,Fields!Title.Value,"Titles") 
.
.
使用
查找
,第一个参数是用于在指定数据集中搜索的值;第二个参数是将应用于数据集并用于匹配第一个参数的表达式

因此,在原始表达式中使用
字段!Row.Value
作为第一个参数将始终返回1,即数据集中的第一行,因此它只匹配一个常量值

如上所述反转这些应该可以让它运行起来