dt = Current Data Table(); tab= dt << Tabulate( Add Table( Column Table( Grouping Columns( :test_type_combo ), Analysis Columns( :Name( "Sum(n_unit)" ), :Name( "Sum(n_unit_passed)" ) ) ), Row Table( Grouping Columns( :work_week, :coil_supplier_B, :product_family ) ) ) ); dtTab= tab << makeIntoDataTable; dtTab << new column("Yield",numeric,Formula( (:Name( "Sum(Sum(n_unit_passed), PrePass)" ) / :Name( "Sum(Sum(n_unit), PrePass)" )) * ( :Name( "Sum(Sum(n_unit_passed), Test1)" ) / :Name( "Sum(Sum(n_unit), Test1)" )) * ( :Name( "Sum(Sum(n_unit_passed), Test4)" ) / :Name( "Sum(Sum(n_unit), Test4)" ) ) * (:Name( "Sum(Sum(n_unit_passed), Test2)" ) / :Name( "Sum(Sum(n_unit), Test2)" )) * (:Name( "Sum(Sum(n_unit_passed), Test3)" ) / :Name( "Sum(Sum(n_unit), Test3)" )) * 100 ) ); dtTab << Graph Builder( Variables( X( :work_week ), Y( :Yield ), Y( :Name( "Sum(Sum(n_unit), Test1)" ) ), Group X( :product_family ), Overlay( :coil_supplier_B ) ), Elements( Position( 1, 1 ), Points( X, Y, Legend( 6 ) ), Line( X, Y, Legend( 7 ) ) ), Elements( Position( 1, 2 ), Bar( X, Y, Legend( 4 ) ) ), SendToReport( Dispatch( {}, "400", ScaleBox, {Legend Model( 6, Base( 0, 0, 0 ), Base( 1, 0, 0 ), Base( 2, 0, 0 ) )} ), Dispatch( {}, "graph title", TextEditBox, {Set Text( "coil_supplier_B" )} ), Dispatch( {}, "Y 1 title", TextEditBox, {Set Text( "unit Qty" )} ), Dispatch( {}, "400", LegendBox, {Legend Position( {6, [0, 1, 2], 7, [6, 7, 8], 4, [3, 4, 5]} ), Position( {0, 1, 2, 6, 7, 8, 3, 4, 5} )} ) ) );