我想打印特定于仪表板每个页面的过滤方案的“名称”。
例如,仪表板的第 1 页可能有一个名为“Filter Scheme 1”的过滤方案,而第 2 页有“Filter Scheme 2”。我有输出所有过滤方案的代码,但我无法弄清楚如何将特定方案与它所在的页面相关联。
for pg in Document.Pages:
print pg.Title # the page name
myPanel = pg.FilterPanel
print myPanel.Title # output is the word: Filters
# THIS IS WHERE I WOULD WANT THE FILTERING SCHEME NAME TO APPEAR
print myPanel.Visible # output: True
print myPanel.Context # output: Spotfire.Dxp.Application.Filters.FilterPanel
print myPanel.TypeId # TypeIdentifier:Spotfire.FilterPanel
print myPanel.FilteringSchemeReference
for i in range(myPanel.TableGroups.Count):
for gcObj in myPanel.TableGroups[i].FilterCollectionReference:
myFilter= myPanel.TableGroups[i].GetFilter(gcObj.Name)
if myFilter.Visible:
szCanSee = ' <Visible>'
else:
szCanSee = ' <Hidden>'
print myFilter.FilterReference.ToString() + szCanSee