Order Entry – Epicor® 9

As an expert in Epicor® consulting, we like posting answers to common questions I see on forums. A lot of users want to be able to print reports directly from the entry screes like Order Entry. Below is some sample code on how to print the sales order pick ticket. This will submit the print request and open the report in preview mode.

Here are the steps:

  1. Add a button to the summary tab. I’m assuming you know how to place a button on the screen and create a button click event. You can look at the article on Automatic Pack Slitp Number Generation.
  2. Add the following assembiles to your customization:
    • Epicor.Mfg.Core.BLConnectionPool
    • Epicor.Mfg.Rpt.ISOPickListReport
    • Epicor.Mfg.Rpt.SOPickListReport
  3. Add the following code to the button click event:
private static void btnPickList_Click(object sender, System.EventArgs args)
{
 Epicor.Mfg.Core.Session epiSession = default(Epicor.Mfg.Core.Session);
 epiSession = (Epicor.Mfg.Core.Session)SalesOrderForm.Session;
 Epicor.Mfg.Rpt.SOPickListReport rptSOPickList = new Epicor.Mfg.Rpt.SOPickListReport(epiSession.ConnectionPool);
 Epicor.Mfg.Rpt.SOPickListReportDataSet rptDSSOPickList = rptSOPickList.GetNewParameters();

EpiDataView edvOrderHed = (EpiDataView)oTrans.EpiDataViews[“OrderHed”];

 

DateTime dtShipBy = default(DateTime);

 

dtShipBy = Convert.ToDateTime(edvOrderHed.dataView[edvOrderHed.Row][“RequestDate”]);

 

// You may need a wider date range to include releases out side the ship date on order header
if (DateTime.Compare(DateTime.Today, dtShipBy) > 0) {
rptDSSOPickList.Tables[“SOPickListReportParam”].Rows[0][“FromDate”] = dtShipBy.AddDays(-1);
} else {
rptDSSOPickList.Tables[“SOPickListReportParam”].Rows[0][“ToDate”] = dtShipBy.AddDays(1);
}

 

rptDSSOPickList.Tables[“SOPickListReportParam”].Rows[0][“OrderList”] = edvOrderHed.dataView[edvOrderHed.Row][“OrderNum”];
rptDSSOPickList.Tables[“SOPickListReportParam”].Rows[0][“AutoAction”] = “Preview”;
//Set this to your task agent id.
rptDSSOPickList.Tables[“SOPickListReportParam”].Rows[0][“AgentID”] = “TaskAgnt”;

 

//The report style you want to print.
rptDSSOPickList.Tables[“SOPickListReportParam”].Rows[0][“ReportStyleNum”] = 1002;
rptDSSOPickList.Tables[“SOPickListReportParam”].Rows[0][“WorkstationID”] = Environment.MachineName + ” ” + Process.GetCurrentProcess().SessionId.ToString();
rptDSSOPickList.Tables[“SOPickListReportParam”].Rows[0][“DateFormat”] = “mm/dd/yyyy”;
rptDSSOPickList.Tables[“SOPickListReportParam”].Rows[0][“NumericFormat”] = “,.”;

 

// TaskAgnt is the ID of your task agent.
rptSOPickList.SubmitToAgent(rptDSSOPickList, “TaskAgnt”, 0, 0, “Epicor.Mfg.UIRpt.SOPickListReport”);

 

MessageBox.Show(“Pick List Print Job Submitted.”);
}

Suggested

Becky Lipnick

Recent Posts

Infor CSI Syteline – Paste Rows Append for Data Load

Entering Records individually into CSI will ensure that the required data is filled out for…

2 months ago

Infor VISUAL ERP: How to Future-Proof Your Manufacturing Operations

For decades, Infor VISUAL ERP has been the backbone of countless manufacturers. Its strength lies…

3 months ago

Infor CloudSuite Industrial: Features & Options

Infor CSI (Syteline) - Features & Options With the creation of Infor Configure Price Quote…

8 months ago

Infor CSI: Excel Report Output Format for Reports Without a Dataview

Infor CloudSuite Industrial (CSI) provides powerful reporting capabilities, often leveraging Dataviews for easy extraction of…

8 months ago

How Datix can help Support your Infor VISUAL ERP Platform

In today’s fast-paced manufacturing environment, efficiency, accuracy, and scalability are critical for business success. Infor…

10 months ago

Hand-Picked Digital Marketing Platforms for Manufacturers

Platform: HubSpot Where It Shines: Email marketing - easy to use email lists, automation, and…

2 years ago