문제
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