I am using a Function to create multiple plots based on different conditions. Sometimes it calls for me to exclude (extreme outliers) rows in order to better fit the graph when presenting it to our customers.I tried to use a global flag to set whether or not it that box needs to be deleted but as i found out yesterday there are possibilites when the flag will = 1 however the test condition has no Textbox( 5 ).
The text box automattically gets its own slide so I need to remove it.
Any help would be appreciated
GraphPlot = Function(
{dt, Yaxis },
Eval(
Substitute(
Expr(
gb = dt << Graph Builder(
Invisible,
Where( dt:chnl == chan & dt:astate == attn & dt:pstate == phas ),
// Size( 1440, 1040 ),
show control panel( 0 ),
show legend( 0 ),
Subtitle Alignment( "Left" ),
Show Subtitle( 1 ),
Variables(
Y( Eval( Yaxis ) ),
X( :FREQ_GHz ),
Group X( :wafer_number ),
Overlay( :RowCol )
),
Elements( Smoother( X, Y, legend( 19 ), lambda( 0.0001 ) ) ),
)
),
Expr( plot ), plot,
Expr( chan ), chan,
Expr( attn ), attn,
Expr( phas ), phas,
Expr( mode ), mode,
Expr( tst ), tst
)
);
Report( gb )[Axisbox( 1 )] << Min( 7 ) << Inc( 1 ) << Add Ref Line( 8, "Solid", "Black", "m106", 1 ) << Add Ref Line( 17.5, "Solid", "Black", "m105", 1 ) << Label Row( Show Major Grid( 1 ) );
Report( gb )[Axisbox( 2 )] << Inc( 2 ) << Minor Ticks( 1 ) << Label Row( Show Major Grid( 1 ) );
(gb << Top Report)[Text Box( 1 )] << Delete;
// This may or may not happen on every condition
// I tried creating a flag when i actually exclude parts however
// The flag is global and not specific on a test condition
If( excludeFlag == 1, Report( gb )[Text Box( 5 )] << Delete );
Report( gb )[Framebox( 1 )] << Frame Size( 781, 655 );
Report( gb )[Outline Box( 1 )] << Set Title( Eval Insert( WaferListSQLString || " ^tst^" ) );
Report( gb )[Text Edit Box( 2 )] << Set Font Size( 15 ) << Set Font Style( "Bold" );
Report( gb )[Text Edit Box( 1 )] << Set Font Size( 25 ) << Set Font Style( "Bold" );
);