2016-11-08 76 views
0

我有兩個Tablix的Tablix甲的Tablix乙如何填充從另一個Tablix數據集引用數據的Tablix?

每個Tablix被連接到不同datasets如下圖所示:

如何填充的Tablix乙通過在查找數據Tablix A?

例如:Tablix A包含Vehicle模型,但我也需要在兩個數據集中使用VehicleID填充車輛顏色的Tablix B.

使用Lookup Function,這僅適用於兩個數據集都是同一個tablix中的引用,我如何使用單獨的tablix來執行此操作?

嘗試使用不同的表矩陣,我得到下面的錯誤:

[rsFieldReference] The Value expression for the text box 
‘Textbox57’ refers to the field ‘VehicleColor’. 

Report item expressions can only refer to fields within the current dataset scope or, 
if inside an aggregate, the specified dataset scope. 
Letters in the names of fields must use the correct case. 

插圖:

enter image description here

+0

你是什麼表情。 – Kostya

+0

我正在使用這裏解釋的表達式: https://msdn.microsoft.com/en-us/library/ee240819.aspx '= LookupSet(Fields!TerritoryGroupID.Value,Fields!ID.Value,Fields! StoreName.Value,「Stores」)' – Asynchronous

+0

您是否嘗試過使用「Lookup」 – Kostya

回答

0

您可以使用 「查找」 來獲取其它數據集中的單個值。例如:

=Lookup(Fields!VehicleID.Value, Fields!VehicleID.Value, Fields!VehicleColour.Value, "Vehicles") 

會帶出單個(數據集中的第一個)VehicleColour其中的ID相匹配。如果兩個數據集之間只有一個ID匹配,則會返回正確的顏色。

=LookupSet(Fields!VehicleID.Value, Fields!VehicleID.Value, Fields!VehicleColour.Value, "Vehicles") 

帶來了一個數組,如果它使用轉換成一個字符串,它只能顯示在文本框中加入:

=join(LookupSet(Fields!VehicleID.Value, Fields!VehicleID.Value, Fields!VehicleColour.Value, "Vehicles"), ", ") 

它會帶出一個逗號分隔的所有VehicleColours其中ID列表比賽。

有關查詢更多信息,請參見:https://msdn.microsoft.com/en-GB/library/ee210531.aspx

有關Lookupset的更多信息,請參見:https://msdn.microsoft.com/en-us/library/ee240819.aspx

相關問題