It is a simple matter to strip off the wafer value from the Outline Box() for the Distribution, and then to do a lookup from the lookup data table and get the BatchID, or in the case of my example, to get the Lot_id, and then to add it to the title of the Outline Box().
Names Default To Here( 1 );
dt = Current Data Table();
batchids = Associative Array( dt:lot_id );
dtlookup =New Table( "Lookup",
Add Rows( 24 ),
New Column(
["en" => "wafer", "ja" => "ウエハー", "x-id" => "S_wafer_Col", "zh-CN" => "晶片"],
Numeric( 1 ),
"Nominal",
Set Values(
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24]
),
Lock( 1 )
),
New Column( "lot_id",
Character,
"Nominal",
Set Values(
{"lot01", "lot02", "lot03", "lot04", "lot05", "lot06", "lot07", "lot08",
"lot09", "lot10", "lot11", "lot12", "lot13", "lot01", "lot02", "lot03",
"lot04", "lot05", "lot06", "lot07", "lot08", "lot09", "lot10", "lot11"}
)
)
);
Dis = dt << Distribution(
Stack( 1 ),
Automatic Recalc( 1 ),
Continuous Distribution(
Column( :npn1 ),
Horizontal Layout( 1 ),
Vertical( 0 )
),
Local Data Filter(
Close Outline( 1 ),
Add Filter( columns( :site ), Where( :site == 1 ) )
),
By( :Wafer )
);
For( i = 1, i <= N Items( Dis ), i++,
theWafer = num(word(-1,Report( dis[i] )[Outline Box( 1 )] << get title,"="));
thelot = dtLookup:lot_id[(dtLookup << get rows where(:wafer == theWafer))[1]];
Report( dis[i] )[Outline Box( 1 )] <<
Set title(
Report( dis[i] )[Outline Box( 1 )] << get title || " Lot="
|| Char(thelot)
)
);
Jim