I am new to SSRS and I want to call two datasets in a single table in a single report.I'm trying to use the LOOKUP function in order to lookup information in a second data source. The expression I used is
=Lookup(Fields!DISTRIBUTOR_ID.Value, Fields!D0030_DISTRIBUTOR_ID.Value, Fields!D0030_LINE_LOSS_FACTOR_CLASS_ID.Value, "DataSet2")
and I used DataSet1 initially in my table.
But when previewing the report, I got the error message:
The Value expression for the text box ‘Textbox3’ refers to the field "D0030_DISTRIBUTOR_ID". Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope.
And when I type Lookup in my expression I get the red squiggly lines under it.