Hi all,
I am trying to make a script that will print data for me. I have a journal, where I want to print data for each of the Outline boxes (please see journal data.jrn).
I am aware I am missing quite a bit to reach the data table I wish, but I have come across the first hurdle and that is it only prints for 1 outline box and not all. See my script below:
// JMP version 16<BR />sd = currentdatatable();<BR />rpt = Current Journal();
// Get the number of outline boxes
numOutlineBoxes = nitems(rpt);
int = rep = sumfit = sumfitLL = sumfitUL = {};
sum = 0;
// Loop through each outline box
for (i = 1, i <= numOutlineBoxes, i++,
outlineBox = rpt[i];
sumfit = outlineBox[Outline Box( numOutlineBoxes )][Number Col Box( 1 )] << Get as Matrix;
sumfitLL = outlineBox[Outline Box( numOutlineBoxes )][Number Col Box( 3 )] << Get as Matrix;
sumfitUL = outlineBox[Outline Box( numOutlineBoxes )][Number Col Box( 4 )] << Get as Matrix;
sumfit_rep = Round( sumfit[2] , 3 );
sumfit_int = Round( sumfit[3] , 3 );
lowerCL_rep = Round( sumfitLL[2] , 3 );
upperCL_rep = Round( sumfitUL[2] , 3 );
lowerCL_int = Round( sumfitLL[3] , 3 );
upperCL_int = Round( sumfitUL[3] , 3 );
Insert Into( rep, Char( sumfit_rep ) || " [" || Char( lowerCL_rep ) || " ; " || Char( upperCL_rep ) || "]" );
Insert Into( int, Char ( sumfit_int ) || " [" || Char( lowerCL_int ) || " ; " || Char( upperCL_int ) || "]" );
// Get By Group column
//whereCol = Word( 2, ((rep << parent)[Text Box( 1 )]) << get text, ":=)" );
term = outlineBox[Outline Box( numOutlineBoxes )][String Col Box( 1 )] << Get();
sum = sum + 1
);
// Create the table
dlg = New Window( "Custom Report",
Outline Box( "Selected Values",
Lineup Box( N Col( 2 ), Text Box( "Factor of Interest: " ), Text Box( term[1] ) ),
Spacer Box( size( 0, 10 ) ),
tb = Table Box(
String Col Box( "Paramenter", testvalue ),
//String Col Box( whereCol, repeat(ByGroups, sum) ),
String Col Box( "Repeatability, " || term[1], rep ),
String Col Box( "Intermediate precision, " || term[2], int ),
)
)
);
tb << Set Shade Headings( 0 ); // Turn off shaded table headings.
tb << Set Column Borders( 1 ); // Turn off table column borders.
tb << Set row Borders( 1 );
tb << border( 1 );The print looks as follows:

At the final stage, I would like the pint to look as follows:

To sum up, I have the following steps that need to be fixed:
1. Get the loop to work so that all Outline boxes are taken into account
2. Get it to include parameter and batch
3. Get it to dividedly print repeatability and intermediate with the laboratory AA/BB
I hope you can help me with this.
Best regards,
Julie