Ho una serie mensile di report sulle capacità da eseguire e il cliente interno apprezza molto il Capability Explorer del marketplace, e perché no, è davvero valido. Il mio problema è che ho 60 report individuali da confrontare (ne fa uno per colonna). Quindi ho scritto (modificato) questo JSL che raccoglieva i report selezionati in un registro che potevo esportare in PDF. Ha funzionato tutto correttamente (a parte l'opzione di chiusura automatica delle finestre, che ho abbandonato), ma non funziona da quando ho aggiornato alla versione 19. L'errore (almeno il primo errore!) è:
Argomento della piattaforma previsto nell'accesso o nella valutazione di 'Report', argomento non valido (w), Report/*###*/(w)
alla riga 92 in pathGoesHere\Chooser e PDF export v2.jsl
Gradirei davvero un aiuto o qualche suggerimento.
// ===== BEGIN: Select windows and export a single combined PDF (with headers/footers & page breaks) =====
Names Default To Here( 1 );
// -------------------- User Controls --------------------
allowCloseDataTables = 1; // 0 = keep Data Table windows open (safe), 1 = allow closing them
forceCloseNoPrompt = 0; // 1 = Close(..., No Save) for hands‑free; 0 = allow Save prompts (may block)
// -------------------- Summary Counters --------------------
closedCount = 0;
attemptedCount = 0;
failedCount = 0;
skippedDTCount = 0;
skippedJournalCount = 0;
// -------------------- 1) Collect open windows (JMP 18 reliable) --------------------
winRefs = Get Window List(); // list of top-level window handles
winTitles = {};
// Build clean titles for the list (characters only)
For( i = 1, i <= N Items( winRefs ), i++,
w = winRefs[i];
t = "Window " || Char( i );
Try(
t0 = w << Get Window Title;
t = Char( t0 );
If( Is Empty( t ), t = "Window " || Char( i ) );
);
Insert Into( winTitles, t );
);
// -------------------- 2) Dialog: pick windows + optional "close after export" --------------------
selIdx = {};
closeAfter = 0;
New Window( "Select windows to include", <
<MODAL>
0; ), Spacer Box( Size( 12, 0 ) ), Button Box( "Cancel", selIdx = {}; closeAfter = 0; ) ) ) ); If( N Items( selIdx ) == 0, Throw( "No windows selected." ) ); // -------------------- 3) Build a list of Data Table windows (no probing on random windows) -------------------- dtWinRefs = {}; nt = N Table(); For( i = 1, i <= nt, i++, dt = Data Table( i ); Try( dtw = dt << Get Window; // window that hosts this Data Table If( !Is Empty( dtw ), Insert Into( dtWinRefs, dtw ); ); ); ); // -------------------- 4) Build the combined journal with static content -------------------- jnw = New Window( "Combined Report", <
<JOURNAL></JOURNAL></MODAL>
Sembra che JMP19 abbia cambiato ciò che accade quando si tenta di utilizzare la funzione Report in una nuova finestra: in JMP18 verrà restituito un valore mancante e in JMP19 verrà generato un errore. Ci sono molte opzioni che potresti provare, ma forse qualcosa del genere è sufficiente: aggiungi Try() alla riga 92.
Originale:

Modificato
rb = Try(Report(w), .);
content = Picture Box(w << Get Picture);
If(!Is Empty(rb),
Try(content = rb << Clone Box); // upgrade to cloned report if possible
);
Grazie per l'informazione. Sto ancora imparando a usare JSL. Try() è un concetto del tutto nuovo per me.