I have a script that I am trying to use to make a report containing many control charts with corresponding process capability data. Producing the journal containing all of the control charts and capability works great. Now I want to add a report type page indicating any charts that have Cpk's below a certain value. To do this I need to make a combine data table with all the Cpk's that are produced. I can do it by the right click method but need to use JSL. I have seen many threads regarding this and have tried the multiple variation of Report << make combine data table but it hasn't worked quite right. The general script I have is this:
For( i = 1, i <= N Items( desired_measurement), i++,
//make a table from the data of the desired_measurement
dt = desired_measurement data
//produce a control chart as follows
cc = Control Chart Builder(
Size( 450, 900 ),
Show Two Shewhart Charts( 0 ),
Show Control Panel( 0 ),
Include Missing Categories( 0 ),
Variables(Subgroup(:lot), Y( :column( 4 ), Individual Measurement, Moving Range ) ),
Chart(
Points( Statistic( "Individual" ) ),
Limits( Sigma( "User Defined" ) ),
Set Control Limits( {LCL( lcont ), UCL( ucont )} ),
Add Spec Limits( {LSL( lower_spec ), USL( upper_spec ), Target( desired )} )
),
SendToReport(
Dispatch(
{},
edc_name,
ScaleBox,
{Add Ref Line( lspec, "Solid", "Blue", "LSL", 1 ),
Add Ref Line( uspec, "Solid", "Blue", "USL", 1 ),
Add Ref Line( desired, "Solid", "Blue", "Target", 1 )}
),
Dispatch(
{edc_name || " Limit Summaries", "Process Capability Analysis", "Histogram"},
"Process Capability Analysis Histogram",
FrameBox,
{Frame Size( 150, 18 )}
),
Dispatch(
{edc_name || " Limit Summaries", "Process Capability Analysis", "Histogram"},
"Process Capability Analysis Histogram",
FrameBox( 2 ),
{Frame Size( 150, 160 )}
)
)
)
// append cc to a journal
<< append(cc)
)
The number of control charts can range from 1-100 or so. I can't seem to figure out how to make it << Make combine data table after the journal is populated with the various control charts. Any help would be greatly appreciated.
Thanks