views:

38

answers:

1

I have a SSRS R2 report built and it works fine on the preview tab but when I try to deploy the report to the report server I get the following error:

Error 1 The Value expression for the text box ‘Textbox23’ refers to the field ‘Bats’. Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope. 0 0

TextBox23's value is an expression:

=Lookup(Fields!PlayerId.Value, Fields!PlayerId.Value, Fields!Bats.Value, "profileDataSet") + " / " + Lookup(Fields!PlayerId.Value, Fields!PlayerId.Value, Fields!Throws.Value, "profileDataSet")

I have hard coded in a string value for the first part of the concatenated string and it just moves the error down to the "throw" part. So obviously something is amiss with the lookup function. I have seen similar errors before when i have not had the report sections set to the correct dataSets but usually you see the msg when you try and preview the report not deploy it only. I'm just lost on this one.

Thanks in advance, Jeff

A: 

I believe I found the issue. It is a SQL 2008 vs 2008 R2 issue. The lookup function is new to R2 so when I tried to deploy to a server running the previous version it didn't like it.

There is a property on the project called "target server version" that at deploy time created different errors based on my selection. So I assume locally I can handle the lookup function but at deploy time it realizes there is an unknown function. We updated the server to R2 and all the errors went away and my deploy was successful.

Thanks, Jeff

iamspo