SSRS2008需要手動調整程式碼又一例
SSRS(Reporting Service)中有些特性的調整,在設計介面不容易找到或根本找不到, 這時就需要切換到程式碼(Code)介面進行調整。
今天在刪除一個Group時, 除錯報表出現如下錯誤:
[rsInvalidToggleItem] The tablix ‘table1’ has ‘TestStation’ as a toggle item. Toggle items must be text boxes that share the same scope as the hidden item or are in a scope that contains the hidden item, and cannot be contained within the current report item unless current grouping scope has a Parent.
Build complete -- 1 errors, 0 warnings
右鍵相關rdl檔案, 選“View Code”, 在
<TablixMembers>
<TablixMember>
<Group Name="table1_Details_Group">
<DataElementName>Detail</DataElementName>
</Group>
<TablixMembers>
<TablixMember />
</TablixMembers>
<DataElementName>Detail_Collection</DataElementName>
<DataElementOutput>Output</DataElementOutput>
<KeepTogether>true</KeepTogether>
</TablixMember>
</TablixMembers>
下面找到如下欄位:
<Visibility>
<Hidden>true</Hidden>
<ToggleItem>TestStation</ToggleItem>
</Visibility>
刪除後, 問題解決。