2017-05-06 1 views
0

私は自分のカスタムエントリを作成しました。私はそれにいくつかのレポートを追加する必要があります。 私はこのようなレポートのドロップダウンを取得しようとしています enter image description here しかし、私の努力はすべて成功していません。Acumatica ERP 6.0レポートの作成ドロップダウン

私がアクションを持っていると同じように機能するには、領収書のエントリ

public PXAction<MyMasterView> report; 

    [PXUIField(DisplayName = "Reports", MapEnableRights = PXCacheRights.Select),PXButton(SpecialType = PXSpecialButtonType.Report)] 
    protected virtual IEnumerable Report(PXAdapter adapter, [PXString(8, InputMask = "CC.CC.CC.CC"), PXStringList(new string[]{"PO649999","PO646000"}, new string[]{"Print My Report","Print Receipt"})] string reportID) 
    { 
     List<MyMasterView> list = adapter.Get<MyMasterView>().ToList<MyMasterView>(); 
     if (!string.IsNullOrEmpty(reportID)) 
     { 
      this.Save.Press(); 
      int num = 0; 
      Dictionary<string, string> dictionary = new Dictionary<string, string>(); 
      foreach (MyMasterViewcurrent in list) 
      { 
       dictionary["PARAMETER"] = current.PARAMETER; 
       num++; 
      } 
      if (num > 0) 
      { 
       throw new PXReportRequiredException(dictionary, reportID, string.Format("Report {0}", reportID)); 
      } 
     } 
     return list; 
    } 

である。しかし、結果として、私は取得しています以下の

あなたがこれを扱うことができるカップルの方法がありますenter image description here

答えて

2

。他の方法は、リストを利用して、自動化の手順とそれを制御することです Acumatica - Add additional buttons to Actions drop down to screen CT30100

一つの方法は、ここで別の質問に概説されています。

PO領収書の画面を見ると、これを見ることができます。

public PXAction<POReceipt> report; 
    [PXUIField(DisplayName = "Reports", MapEnableRights = PXCacheRights.Select)] 
    [PXButton] 
    protected virtual IEnumerable Report(PXAdapter adapter,   

    [PXString(8, InputMask = "CC.CC.CC.CC")] 
    [PXStringList(new string[] { "PO646000", "PO632000", "PO622000" }, new string[] { "Purchase Receipt", Messages.ReportPOReceiptBillingDetails, Messages.ReportPOReceipAllocated })] 
    string reportID) 
    { 
     List<POReceipt> list = adapter.Get<POReceipt>().ToList(); 
    if (string.IsNullOrEmpty(reportID) == false) 
    { 
      Save.Press(); 
     int i = 0; 
     Dictionary<string, string> parameters = new Dictionary<string, string>(); 
      foreach (POReceipt doc in list) 
     { 

      if (reportID == "PO632000") 
      { 
       parameters["FinPeriodID"] = (string)Document.GetValueExt<POReceipt.finPeriodID>(doc); 
        parameters["ReceiptNbr"] = doc.ReceiptNbr; 
      } 
      else 
      { 
        parameters["ReceiptType"] = doc.ReceiptType; 
       parameters["ReceiptNbr"] = doc.ReceiptNbr; 
      } 
      i++; 

     } 
     if (i > 0) 
     { 
      throw new PXReportRequiredException(parameters, reportID, string.Format("Report {0}", reportID)); 
     } 
    } 
     return list; 
    } 

お知らせ可能な値と説明がありPXStringList:
1)他の項目のリストを取り、あなたのボタンのメソッドを作成します。

次に、オートメーションステップからアクティブ/非アクティブ状態を制御することができます。

enter image description here

あなたの元の質問に欠けているのステップは、あなたがまだリストに追加する自動化段階からこれらのボタンを追加する必要があるということです。

関連する問題