the hidden expression for table contains an error: Object variable or with block variable not set
I am trying to hide an SSRS column based on the ReportServerURL. If it is on site A it will be hidden but if it is on Site B it will be shown. This is the expression that I am using in the Column Visibility property. =IIf(Globals!ReportServerUrl.IndexOf("devrxanalytics") >= 0, false, true)
The problem is that it works once it is deployed to either sharepoint site, but when I try to view it in Visual Studio under preview, I get the following error:
the hidden expression for table contains an error: Object variable or
with block variable not set
Not a big deal since it works on the site but how would I resolve this so that I may view the report in Preview mode?