By using this website, you agree to our Terms of Use (click here)
I'm relatively new to Acumatica. I have the need (as most do) to add some custom reports to certain screens. I am not really a programmer so hoping to do as much as I can through the available non-coding tools if possible. My understanding is that this can often be accomplished through Automation Steps. I also saw in one of Tim Rodman's posts that evidently new in 2019 R1 custom reports can be added with a customization project using those tools. I was able to add some reports using a customization project so that is great. I have also had some success adding reports via Automation Steps but not on every screen. Some screens just not giving me the same option to specify a report ID as a value under the "Report" action and "Fill with Values" subscreen. Is it a known/accepted fact that adding a report via Automation Steps will not work on every screen? If so, how do we know which will and won't other than just trying? And when it doesn't work - just use a Customization Project? Or should Automation Steps work on each screen and when I find one that doesn't should I report to support? In a perfect world I'd have one way to accomplish this task rather than some one way and some another.
Just looking for feedback, best practices, etc. on this matter. Thanks in advance for any direction.
Hi Kevin,
The inconsistencies with the ease of how you can use Automation steps to add reports in the SO and PO screens is frustrating because the AP and AR screens this has to be done with code - these little nuances make you think twice before what you promise to a customer, below is some sample code to add a report to the AP Bills and Memo's screen, (hope it makes sense)
public PXAction<POReceipt> ACMEPOReceipt;
[PXUIField(DisplayName = "Print Calculated Stock Duty")]
[PXButton]
protected virtual void ACMEPOReceipt()
{ POReceipt current = Base.Document.Current;
if (current.ReceiptNbr!= null)
{
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters["ReceiptType"] = current.ReceiptType;
parameters["ReceiptNbr"] = current.ReceiptNbr;
throw new PXReportRequiredException(parameters, "MA646999", null);
}
}
public override void Initialize()
{ base. Initialize();
Base.report.AddMenuAction(ACMEPOReceipt) ;
}
I have not done a full audit of the screens, maybe Acumatica should be providing this to us.
Carl
Agreed, these inconsistencies are indeed frustrating.
The Customization Project way seems to be the "new way" so I would try that first. I have no hard evidence to support this, but I wonder if Automation Steps will still be around in 2-3 years.
the above technique is a great way to add reports without dealing with Automation steps. however, it was annoying (to me) that the reports would only be available if the record status was On Hold. depending on the nature of the report, users may want to print the report after the record has been processed (released, confirmed, etc). of course, I could handle it with automation steps, but I wanted to easily include the change in a customization project, so...
doing the following in <dac>_RowSelected allows users to print the report for a receipt, regardless of its status. Hopefully someone will find this helpful...
protected void POReceipt_RowSelected(PXCache cache, PXRowSelectedEventArgs e) {
POReceipt row = (POReceipt)e.Row;
if (row != null) {
ACMEReceipt.SetEnabled(row.ReceiptNbr.Trim() != "<NEW>"); // allow report for any record that has been saved
}
}