Look at method fetch() of the SalesInvoice report.
while (tradeLoopTrans.next())
{
custInvoiceTrans = tradeLoopTrans.get(tablenum(CustInvoiceTrans));
// ....
this.send(custInvoiceTrans);
custInvoiceTrans is an each invoive line which will be printed in report.
Next look at Design, Section Group : CustInvoiceJour -> Section Group : CustInvoiceTrans. Here are all fields, which will be printed
So you need:
On the table CustInvoiceTrans create the display method:
display str getClassification()
{
InventTable table = InventTable::find(this.ItemId);
InventItemGroup grp = InventItemGroup::find(teble.ItemGroupId);
;
return grp.new_field
}
This method return your classification for each CustInvoiceTrans.
On report design, on section Section Group : CustInvoiceTrans create a new field.
DataSource = CustInvoiceTrans
DataMethod = getClassification