SSRS Scope Problem

I have a SSRS 2008 R2 report that uses this expression in a table:

=Lookup(Fields!DataSet1Date.Value, Fields!DataSet2Date.Value, Fields!DataSet2Price.Value, "DataSet2") 

I have 2 datasets and I use the Lookup function to retrieve data from one dataset based on the date in another dataset.

My problem is that this works on the machines I tried, but others get errors like this:

 Error 1 [rsFieldReference] The Value expression for the text box 'Col_D2Price' refers to the field 'DataSet2Date'. Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope. Error 2 [rsFieldReference] The Value expression for the text box 'Col_D2Price' refers to the field 'DataSet2Price'. Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope. 

What else can be done to resolve this issue? We all use the same version of 2008R2.

+4
source share
1 answer

I thetern gets this "phantom" error when using the LookUp function. I call it phantom as not, where I can find the reason, but an error appears there.

The only way around this in my cases is to use the secondary LookUpSet function.

Hope I helped.

Edit:

In addition, you intrigued me, so I did some research:

  • The LookUp function is only for a 1 to 1 relationship.
  • The loopupset function for a one-to-many relationship.
  • The multilookup function multilookup designed for many 1 to 1 relationships, i.e. an array of single values, where in the second data set there is only 1 value. Not relevant, but quite interesting.

Also I came across a potential fix. On new machines, try opening data tables in reports and refresh refresh all in the dialog box. For some reason, this may bind fields to this expression. Go figure ... Blockquote

+5
source

Source: https://habr.com/ru/post/1433053/


All Articles