如何将报告添加到报告的“库存转移”下拉菜单 [英] How to add report to Inventory Transfers dropdown menu for reports

查看:72
本文介绍了如何将报告添加到报告的“库存转移”下拉菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在库存转移屏幕的下拉菜单中添加报告。搜索堆栈溢出后,我找到了以下示例,但由于似乎总是发生,因此它似乎不适用于此屏幕(该示例适用于APPaymentEntry BLC):

I'd like to add a report to the dropdown menu of the Inventory Transfers screen. After searching Stack Overflow, I found the following example, but as it seemingly always happens, it doesn't seem to apply to this screen (the example is for the APPaymentEntry BLC):

 public class APPaymentEntry_Extension : PXGraphExtension<APPaymentEntry> 

 {
     public override void Initialize()
     {
         Base.action.AddMenuAction(ShowURL);
     }

      public PXAction<APPayment> ShowURL;
     [PXUIField(DisplayName = "Print Remittance")]
     [PXButton]
     protected virtual void showURL()
     {
         APPayment doc = Base.Document.Current;
         if (doc.RefNbr != null)
         {
              throw new PXReportRequiredException(doc, "AP991000", null);
         }
     }
 }

没有Base.action

There is no Base.action.AddMenuAction method for the graph extension for INTransferEntry.

如何添加报告以启动此菜单以进行库存转移?

How can I add a report to launch to this menu for Inventory Transfers?

推荐答案

根据我的经验,操作按钮通常由 action BLC成员和 报告 按钮由报告 BLC成员表示。

Based on my experience, the Actions button is usually represented by the action BLC member and the Reports button is represented by the report BLC member.

以下代码段应将报告添加到库存转移下拉菜单中对于报告:

The following code snippet should add a report to the Inventory Transfers dropdown menu for reports:

public class INTransferEntryExt : PXGraphExtension<INTransferEntry>
{
    public override void Initialize()
    {
        Base.report.AddMenuAction(ShowCustomReport);
    }

    public PXAction<INRegister> ShowCustomReport;
    [PXButton]
    [PXUIField(DisplayName = "Show Custom Report")]
    protected void showCustomReport()
    {
        INRegister doc = Base.transfer.Current;
        if (doc != null && doc.RefNbr != null)
        {
            throw new PXReportRequiredException(...);
        }
    }
}

这篇关于如何将报告添加到报告的“库存转移”下拉菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆