- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Data table reports windows
Hey everyone,
Could anyone show me the way with JSL to get all the reports that are open against a data table? What I'm trying to do is be able to click a script button and minimize all the reports that are open for a selected data table.
Thanks for any ideas!
Steve
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Data table reports windows
I am not aware of a direct way to do this, but the below script seems to work
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
)
);
Jim
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Data table reports windows
I am not aware of a direct way to do this, but the below script seems to work
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
)
);
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Data table reports windows
Works perfect, thanks!