Try this script, it produces the following output
Here is the script
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\Semiconductor Capability.jmp" );
// Get all of the continuous columns
colList = dt << get column names( string, continuous );
// For use as an example, delete some spec limits
For( i = 3, i <= N Items( colList ), i = i + 6,
Column( dt, colList[i] ) << delete property( "Spec Limits" )
);
// Create the Process Capability Summary Report
PC = Process Capability(
invisible,
Process Variables( Eval( colList ) ),
Spec Limits Dialog( "No (skip columns with no spec limits)" ),
Capability Box Plots( 0 ),
Within Sigma Summary Report( 1 ),
Goal Plot( 0 ),
Capability Index Plot( 0 )
);
// Get a list of columns processed
processedColList = report(PC)["Within Sigma Capability Summary Report"][String Col Box( 1 )] << get;
// Create an output table
dt2 = Report( PC )["Within Sigma Capability Summary Report"][Table Box( 1 )] << make into data table( invisible );
PC << close window;
// Create a new column that will allow the original order
// of the columns to be listed
dt2 << New Column( "roworder" );
// Process through the data table, and if the column is not found
// in the processed data, add it to the data table
For( i = 1, i <= N Items( colList ), i++,
If( N Rows( Loc( ProcessedColList, colList[i] ) ) == 1,
dt2:roworder[Loc( ProcessedColList, colList[i] )[1]] = i,
dt2 << add rows( 1 );
dt2:Process[N Rows( dt2 )] = colList[i];
dt2:roworder[N Rows( dt2 )] = i;
)
);
// Sort the data into the original order
dt2 = dt2 << sort( by( :roworder ), order( ascending ), replace table( 1 ) );
// Get rid of the no longer needed roworder column
dt2 << delete columns( "roworder" );
// Create the new report
nw = New Window( "Summary Report", <<journal, ob = Outline Box( "Within Sigma Capability Summary Report" ) );
dt2 << journal;
close(dt2,nosave);
Jim