Indeed you are right, now it works perfectly for a 10x10 of columns (see script below).
But I have an issue that if I don't have exactly the same number of X columns than of Y columns, the switching doesn't work ! Any idea please what I am doing wrong ?
// Analysis and column switchers
Oneway(
Y(:Name("553")),
X(:Name("1")),
t Test(1),
Column Switcher(:Name("1"), {:Name("1"), :Name("2"), :Name("3"), :Name("4"), :Name("5"), :Name("6"), :Name("7"), :Name("8"), :Name("9"), :Name("10")}),
Column Switcher(:Name("553"), {:Name("553"), :Name("554"), :Name("555"), :Name("556"), :Name("557"), :Name("558"), :Name("559"), :Name("560"), :Name("561"), :Name("562")}));
//Report creation
rpt = Current Report();
colswitcher_obj = rpt[ColumnSwitcherCOntextOutlinebox( 1 )] << get scriptable object;
colswitcher_obj2 = rpt[ColumnSwitcherCOntextOutlinebox( 2 )] << get scriptable object;
colswitch_list = colswitcher_obj << get list;
colswitch_list2 = colswitcher_obj2 << get list;
// Loop through each Y variable
For(j = 1, j <= N Items(colswitch_list), j++,
// Loop through each X variable
For(k = 1, k <= N Items(colswitch_list2), k++,
/* Change here */
dt1 = rpt[Outline Box( "t Test" )][Table Box( 1 )] << Make Combined Data Table;
/* Concatenate the tables */
If(j == 1 & k == 1,
main_tb = dt1;
main_tb << Set Name( "All" );
,
Try( main_tb << Concatenate( dt1, Append to First Table ) );
Close( dt1, No Save );
);
// Switch to next X column
colSwitcher_obj << Next;
wait(0);
);
// Switch to next Y column
colSwitcher_obj2 << Next;
wait(0);
);