是否有正确的方法从 ssrs 报告的嵌入代码引用 ssrs 报告的字段?
当我尝试使用 Fields!Program.Value
时,出现以下错误 --
There is an error on line 3 of custom code: [BC30469]
Reference to a non-shared member requires an object reference.
通过谷歌搜索,我发现您可以通过在开头添加 Report.
来引用报告的参数。所以我尝试了这个Report.Fields.Program.Value
。
这会导致以下错误...
There is an error on line 3 of custom code: [BC30456] 'Fields' is not a member of 'Microsoft.ReportingServices.ReportProcessing.ExprHostObjectModel.IReportObjectModelProxyForCustomCode'.
所以......总而言之,有没有一种方法可以从嵌入代码中引用字段。我发现我可以将字段 vals 传递给函数本身,但我更愿意直接引用这些字段。
赛斯
最佳答案
您必须将其作为参数传递。
关于sql-server - 如何引用 SSRS 报告的嵌入代码中的字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1400484/