I believe the issue you are having is that each By Group is handled as a separate tree structure under report(rep). Therefore, for each of the By Groups, you have an Outline Box(1) and an Outline Box(2).
To change the title of the outline box for the title Variability Gauge ByGroups and the Variability Chart for MyY titles you can do it with the following
Names Default To Here( 1 );
dt = Current Data Table();
rep = Variability Chart(
Y( :Name( "MyY" ) ),
X( :Name( "MyX1" ), :Name( "MyX2" ) ) ,
Analysis Type( Name( "Choose best analysis (EMS REML Bayesian)" ) ),
By( :Name( "ByGroup" ) )
);
Report( rep[1] )[Outline Box( 1 )] << set title( "The By line for group 1" );
Report( rep[1] )[Outline Box( 2 )] << set title( "The Variability Chart title for group 1" );
Report( rep[2] )[Outline Box( 1 )] << set title( "The By line for group 2" );
Report( rep[2] )[Outline Box( 2 )] << set title( "The Variability Chart title for group 2" );
Jim