我无法找到引用 SalesInvoice 报表数据源的 CustInvoiceTrans 表的正确语法。

这是上下文:我在 InventItemGroup 表上创建了一个新的分类字段,需要从该字段获取发票上每个项目的数据,然后在发票标题上汇总这些数据。

有帮助吗?

解决方案

查看 SalesInvoice 报表的 fetch() 方法。

while (tradeLoopTrans.next())

{

   custInvoiceTrans = tradeLoopTrans.get(tablenum(CustInvoiceTrans));

   // ....

   this.send(custInvoiceTrans);

custInvoiceTrans 是将在报告中打印的每个发票行。

接下来看看设计,剖面组:CustInvoiceJour -> 部分组:客户发票传输。这是将打印的所有字段

所以你需要:

  • 在表 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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top