Hi,
I am having some trouble with the following. I have a group of custom output, grouped by a variable, that I need to be in a single report. I get the output that I need. However, I get so many subset data tables as a result of the for loop. I was reading about tab windows, but there is not much written online about putting multiple data tables into tabs. Is there such an option?
If not, then perhaps I can add an option to my JMP script that automatically minimizes the data tables being generated with the report.
If there is no such option mentioned above, would there be a way to use only the select where statement to select the rows of the data and then use those rows to generate custom and automatic output into a single report? I tried to use this forum's methodology, but I wasn't getting any results.
Here is my current JMP script, along with the jmp file attached.
Names Default To Here( 1 );
dt = Current Data Table();
col9 = Column(dt, "category");
unique_category = Associative Array(col9) << get keys;
nw= New Window("results",
container = V List Box()
);
for (i = 1, i <= N Items(unique_category), i++,
content = V List Box(
vali = unique_category[i];
dt << Select Where(:category == vali);
//subset the selected data
listDT = dt << Subset(
output table name( "Subset where category is " || vali ),
Selected rows only ( 1 ),
Selected columns only( 1 )
);
//Get the measurment units formatted, if applicable
col4 = Column( listDT, "Measurement Units");
units = col4[1];
units_formatted = If(Is Missing(units), "", Is String(units), " (" || units || ") ");
//chart
Oneway(SendToByGroup( {:category == vali},
Y( :results ) ),
SendToByGroup(
{:category == vali},
X( :name),
Connect Means( 1 ),
Grand Mean( 0 )
),
SendToByGroup(
{:category == vali},
SendToReport(
Dispatch(
{},
"2",
ScaleBox,
{Label Row( Set Font Size( 5 ) )}
),
Dispatch(
{},
"results",
TextEditBox,
{Set Text( vali || units_formatted )}
),
Dispatch(
{},
"Oneway Plot",
FrameBox,
{Frame Size( 1500, 300 ), DispatchSeg(
CustomStreamSeg( 6 ),
{Line Color( "Gray" )}
), Row Legend(
subcategory,
Color( 1 ),
Color Theme( "" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
)
);
);
container << Append(content)
);