How to change table/report style in my JSL scripts? I know how to do it in JMP Preference settings.How to change table/report style in my JSL scripts? I know how to do it in JMP Preference settings: File-Preference-Style. But I need to change the preference settings within my own JSL scripts. Is it possible? For example, I like to change Shade Alternate Table Rows( 0 ) to Shade Alternate Table Rows( 1 ), how to do it in JSL?
Re: How to change table/report style in my JSL scripts? I know how to do it in JMP Preference settinIt works perfectly! Thanks a lot!
Re: How to change table/report style in my JSL scripts? I know how to do it in JMP Preference settinHere is an example with the addition of the suggested line of code, that shows what I am talking about. Does this help you at all? If not, can you share your script so I can better see what you are doing.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
jmp_report =
New Window( "Big Class",
Text Box( "Big Class" ),
H List Box(
Outline Box( "Big Class",
rpt = dt << Get As Report
)
),
);
rpt[Tablebox(1)]<< Set Shade Alternate Rows(1);
Re: How to change table/report style in my JSL scripts? I know how to do it in JMP Preference settinBoth ways:
rpt<SPAN class="token punctuation">[</SPAN><SPAN class="token function">Tablebox</SPAN><SPAN class="token punctuation">(</SPAN><SPAN class="token number">1</SPAN><SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">]</SPAN><SPAN class="token operator"><</SPAN><SPAN class="token operator"><</SPAN><SPAN class="token messages"> Set Shade Alternate Rows</SPAN><SPAN class="token punctuation">(</SPAN><SPAN class="token number">1</SPAN><SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">;</SPAN>
<SPAN class="token punctuation">(</SPAN> rep <SPAN class="token operator"><</SPAN><SPAN class="token operator"><</SPAN><SPAN class="token messages"> xpath</SPAN><SPAN class="token punctuation">(</SPAN> <SPAN class="token string">"//TableBox"</SPAN> <SPAN class="token punctuation">)</SPAN> <SPAN class="token punctuation">)</SPAN> <SPAN class="token operator"><</SPAN><SPAN class="token operator"><</SPAN><SPAN class="token messages"> Set Shade Alternate Rows</SPAN><SPAN class="token punctuation">(</SPAN> <SPAN class="token number">1</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">;</SPAN>
don't work neither (the report output is just blank/empty). When in JMP, after the report/layout table is generated, I can just right click anywhere inside the tabl, then select which table style(s) to use. But I just don't know how to do it in JSL.
Re: How to change table/report style in my JSL scripts? I know how to do it in JMP Preference settinThe "<< set shade alternate rows( 1 )" message, needs to be pointed at a specific Table Box(). In your script you could specify to change the first table box in the report output with the following:
rpt[Tablebox(1)]<< Set Shade Alternate Rows(1);
Using this method, you can selectively choose which tables to change.
If you want all tables in the report output to be changed, you can use the Xpath fuction to find all Table Box()s and then apply the change
( rep << xpath( "//TableBox" ) ) << Set Shade Alternate Rows( 1 );
Re: How to change table/report style in my JSL scripts? I know how to do it in JMP Preference settinIt seems not working for me. Here is my script:
dt=current data table();
rpt=dt<
rpt<< Set Shade Alternate Table Rows(1);
...
The rpt output table has nothing changed in its style.
Re: How to change table/report style in my JSL scripts? I know how to do it in JMP Preference settinThe answer to this is found in the Scripting Index
Help==>Scripting Index==>Table Box
Here is the example from the entry for the message, "Set Shade Alternate Rows"
Names Default To Here( 1 );
New Window( "Mountains",
tb = Table Box(
String Col Box( "Mountain",
{"K2", "Delphi", "Kilimanjaro",
"Grand Teton"}
),
Number Col Box( "Elevation (meters)",
{8611, 681, 5895, 4199}
),
Plot Col Box( "", {8611, 681, 5895, 4199} )
)
);
tb << Set Shade Alternate Rows( 1 );