SSRS - Look up field in dataset that is not part of report

半腔热情 提交于 2019-12-06 06:03:21

Yes, that's exactly what the Lookup(...) function is for. The last parameter is the name of the data set that you would like to look in for your value.

From: http://technet.microsoft.com/en-us/library/ee210531.aspx

Lookup(source_expression, destination_expression, result_expression, dataset)

Parameters

source_expression (Variant) An expression that is evaluated in the current scope and that specifies the name or key to look up. For example, =Fields!ProdID.Value.

destination_expression(Variant) An expression that is evaluated for each row in a dataset and that specifies the name or key to match on. For example, =Fields!ProductID.Value.

result_expression(Variant) An expression that is evaluated for the row in the dataset where source_expression = destination_expression, and that specifies the value to retrieve. For example, =Fields!ProductName.Value.

dataset A constant that specifies the name of a dataset in the report. For example, "Products".

Let me know if you need more explanation.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!