嘿大家,
誰能告訴我如何使用 JSL 獲取針對數據表打開的所有報告? 我想要做的是能夠單擊腳本按鈕並最小化為選定數據表打開的所有報告。
感謝您的任何想法!
史蒂夫
我不知道執行此操作的直接方法,但下面的腳本似乎有效
Names Default To Here( 1 );
dt = Current Data Table();
windowNumbersToMinList = {};
theName = Current Data Table() << get name;
// Loop across all windows and find report windos attached to data table name
// Definition of a report window, is one that starts with the data table name and
// is followed by a "-"
i = 1;
While( Window( i ) << get window title != {},
theWName = Window( i ) << get window title;
If( Contains( theWName, theName ) == 1 & Substr( theWName, Length( theName ) + 2, 1 ) == "-",
Insert Into( windowNumbersToMinList, i )
);
i++;
);
// Loop across found windows and minimize them
If( N Items( windowNumbersToMinList ) > 0,
For( i = N Items( windowNumbersToMinList ), i >= 1, i--,
Window( windowNumbersToMinList[i] ) << minimize window
)
);