數據表:取得報告(和其他選項)是什麼激發了這個願望清單請求?
當使用者想要在資料表中新增一行或想要對資料表進行排序時,由於開啟的報告,在 Jmp 中存在無法實現此操作的風險。
排序後如何更新表?
最壞的情況:JSL 腳本只是停止並顯示錯誤訊息,告訴使用者:

通常,報表的順序或行沒有問題,只是需要重新整理。
您希望看到什麼改進?
請解決問題。
不同的方法:
- 所有使用者更新表(新增行、對錶排序)並觸發報表刷新。
- If there are reports which actually have an issue with the changes in the data table, ask the user if it's OK to close them.
For JSL, don't ask the user, provide an option:
sort(..., close reports with issues());
- Does an option like
sort( ..., ignoreEffectsOnReports())
make sense? - Provide a function
myAffectedReports = dt << get reports with issues();
which returns a list of reports with issues with added rows or sorted data tables.
Then the user can close the reports if he wants to.
- at least:
Provide a function
myReports = dt << get reports();
which returns a list with all reports with a link to the data table.
... independent of the actual name of the Window: 如何在應用程式中對資料表進行排序?
Then the user can decide how he wants to continue ...
為什麼這個想法很重要?
根據 Jmp 目前的行為,開啟報表時無法執行某些操作,例如新增行或對資料表進行排序。
在其他程序中,可以毫無問題地執行此類操作。
如何改善 Jmp 用戶的情況有多種可能性。
最好的情況:在幕後提供完整的功能 - 完全不打擾用戶。
更多願望提交者
自動化和腳本編寫回复:數據表:獲取報告(和其他選項)解決方法:獲取全部報告並選擇屬於 dt 的報告。
https://community.jmp.com/t5/Discussions/How-to-update-table-after-sorting/mp/660847/highlight/true#M84975
closeMyReports = Function( {dt},
{default local},
AllmyReports = {};
myReports = Get Window List( Type( "Reports" ) );
For Each( {rep}, myReports,
Try(
myList = (rep << Xpath( "//OutlineBox" )) << get scriptable Object();
myDTs = Transform Each( {scriptableObject}, myList, If( Is Empty( scriptableObject ), ., scriptableObject << Get Data Table() ) );
If( Contains( myDTs, dt ),
Insert Into( AllmyReports, rep )
);
)
);
If( N Items( AllmyReports ) > 0,
If(
ex = New Window( "",
<<TYPE></TYPE>回覆:數據表:取得報告(和其他選項)類似問題:
表:列出所有連結的子集