I'm trying to do a lookup in SSRS 2008 that is within the same dataset.
Here's the scenario:
ID Postcode Name 123456 A12 345 Customer1 234567 B12 456 Customer2 345678 C12 789 Customer3 D12 345 D12 345 City1 A12 345 A12 345 City2
Here's what I'm trying to achieve (add an extra location column):
ID Postcode Name Location 123456 A12 345 Customer1 City2 234567 B12 456 Customer2 City3 345678 D12 345 Customer3 City1 D12 345 D12 345 City1 City1 A12 345 A12 345 City2 City2
I've tried the following expression:
=Lookup(Fields!Postcode.Value,Fields!ID.Value,Fields!Name.Value,"Location")
And here's the error message:
The value expression for the text box 'TextBox45' has a scope parameter that is not valid for a lookup function. The scope parameter must be set to a string constant that is the name of a dataset.
I am aware that the dataset is incorrect in the first place and that it is a terrible practice to structure data like that. However, these are the 'cards' I've been given and I can't change that.
Also, I am aware that I could create a separate query to extract postcodes from the ID field and use that for a lookup but I was just wandering if it's possible to get the same result without the extra dataset?
Sorry if this is a flawed question in the first place.
Any input is much appreciated.