문제

I have got a dataset with 2 columns named Row and Title. There are 8 rows in this dataset and I want to display those 8 titles within columns in a table. So I create a table with 8 columns and set each column's expression to

=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") 
.
.

However only the first column displays a title. The other 7 display nothing. Is my expression wrong?

도움이 되었습니까?

해결책

You actually just need to reverse the first two arguments in the Lookup expression:

=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") 
.
.

With Lookup, the first argument is the value that is being used to search in the specified DataSet; the second argument is the expression that will be applied to the Dataset and used to match the first argument.

So in your original expressions using Fields!Row.Value as the first argument will always return 1, i.e. the first row in the Dataset, and as such it matches only one of the constant values.

Reversing these as above should get it going.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top