質問
SalesInvoiceレポートデータソースのCustInvoiceTransテーブルを参照するための適切な構文が見つかりません。
コンテキストは次のとおりです。InventItemGroupテーブルに新しい分類フィールドを作成し、請求書の各アイテムのこのフィールドからデータを取得して、このデータを請求書のヘッダーに集計する必要があります。
解決
SalesInvoiceレポートのメソッドfetch()を見てください。
while (tradeLoopTrans.next())
{
custInvoiceTrans = tradeLoopTrans.get(tablenum(CustInvoiceTrans));
// ....
this.send(custInvoiceTrans);
custInvoiceTransは、レポートに印刷される各請求行です。
次にデザイン、セクショングループを見てください:CustInvoiceJour->セクショングループ:CustInvoiceTrans。ここにすべてのフィールドがあり、印刷されます
必要なもの:
-
テーブルCustInvoiceTransで表示メソッドを作成します。
display str getClassification() { InventTable table = InventTable::find(this.ItemId); InventItemGroup grp = InventItemGroup::find(teble.ItemGroupId); ; return grp.new_field }
このメソッドは、各CustInvoiceTransの分類を返します。
-
レポートデザインのセクションセクションセクション:CustInvoiceTransで新しいフィールドを作成します。
DataSource = CustInvoiceTrans DataMethod = getClassification
所属していません StackOverflow