Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

2-Email An Epicor BAQ Report From Customization - GingerHelp

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

5/16/24, 3:24 PM Email an Epicor BAQ Report From Customization — GingerHelp

 support@gingerhelp.com

H OW TO E M A I L A N E P I C O R
B AQ R E P O RT F R O M A
C U STO M I Z AT I O N
ADAM ELLIS · JUNE 25, 2020

Last week we spelled out how you can automatically print or preview an
Epicor ERP BAQ report from within customizations.

But what if you want to email an Epicor BAQ report from customizations?
Unfortunately, that is a little more complex.

For this one, you will need to reference Ice.Contracts.DynamicReport and


Ice.Contracts.Rpt.BAQReport and, as opposed to simply automating the
calls to the UI form, we are going to use the business object directly:

// Start off by getting a reference to your current sessio


Ice.Core.Session session = (Ice.Core.Session)oTrans.Sessio

// Now we need to make a reference to DynamicReport so tha


// get a definition of what this report needs to run
Ice.Proxy.BO.DynamicReportImpl dynamicReportImpl = (Ice.Pr

// Here we use GetByID to get the details to run thsi repo


Ice.BO.DynamicReportDataSet reportDs = dynamicReportImpl.G

// The dataset that comes back on GetByID has a table name


// that has 1 row per input option you defined on the BAQ

https://www.gingerhelp.com/knowledgebase-epicor-erp/emailing-a-baq-report-from-a-customization 1/6
5/16/24, 3:24 PM Email an Epicor BAQ Report From Customization — GingerHelp

// Fill in the values here for each row.


reportDs.Tables["BAQRptOptionFld"].Rows[0]["FieldValue"] =
reportDs.Tables["BAQRptOptionFld"].Rows[1]["FieldValue"] =

// Take this dataset and write it out to an XML string


System.IO.StringWriter writer = new System.IO.StringWriter
reportDs.WriteXml(writer);

// Now load the BAQ Report so we can submit it to the agen


// Reference the business object.
Ice.Proxy.Rpt.BAQReportImpl baqReportImpl = (Ice.Proxy.Rpt

// Now create a new BAQReportDataSet


Ice.Rpt.BAQReportDataSet baqDS = new Ice.Rpt.BAQReportData

// Call GetNewParametersForReportId to get the parameters


baqDS = baqReportImpl.GetNewParametersForReportId("MyBAQRe

// Tell it the BAQ for this BAQ Report


baqDS.Tables["BAQReportParam"].Rows[0]["BAQID"] = "MyBAQID
// Just used for system monitor
baqDS.Tables["BAQReportParam"].Rows[0]["ReportTitle"] = "M
baqDS.Tables["BAQReportParam"].Rows[0]["Summary"] = false;
// Don't get confused here, we tell it SSRSPrint but it is
baqDS.Tables["BAQReportParam"].Rows[0]["AutoAction"] = "SS
baqDS.Tables["BAQReportParam"].Rows[0]["EMailTo"] = "aelli
// Email subject goes into the FaxSubject field for some r
baqDS.Tables["BAQReportParam"].Rows[0]["FaxSubject"] = "Em
// This is that XML output from earlier
baqDS.Tables["BAQReportParam"].Rows[0]["Filter1"] = writer
baqReportImpl.SubmitToAgent(baqDS, "System Task Agent", 0,

https://www.gingerhelp.com/knowledgebase-epicor-erp/emailing-a-baq-report-from-a-customization 2/6
5/16/24, 3:24 PM Email an Epicor BAQ Report From Customization — GingerHelp

So definitely not a simple one this week but a useful one. Imagine all of
those spots now where you can have a button fire off emailed reports!

LET'S CHAT ABOUT YOUR NEXT BAQ


PROJECT

AUTHOR: Adam Ellis


Adam Ellis is the owner of
GingerHelp. Adam is a lifelong
entrepreneur and has extensive ERP
and mobile software knowledge
through his consulting and
management experience. He has a
passion for exploring innovative ideas
and how they can change the status
quo. Connect with Adam on LinkedIn
to learn more about his involvement
in the ERP space.

FACEBOOK TWI TTER PINTEREST 0 LIKES

COMMENTS (0) Newest First

https://www.gingerhelp.com/knowledgebase-epicor-erp/emailing-a-baq-report-from-a-customization 3/6
5/16/24, 3:24 PM Email an Epicor BAQ Report From Customization — GingerHelp

Preview POST COMMENT…

PREVIOUS

ADDING CUSTOM TABLES TO A SCREEN IN EPICOR


EPICOR BAQ, EPICOR CUSTOMIZATION, EPICOR ERP

NEXT

EPICOR: HOW TO CALL A BAQ REPORT FROM WITHIN A


CUSTOMIZATION
EPICOR CUSTOMIZATION, EPICOR ERP, EPICOR BAQ

LET’S CHAT!

CONTACT US

GINGERHELP, SERVIC PRODU KNOWLEDGE


LLC ES CTS BASE

8685 Fox Epicor ERP Epicor ERP Epicor ERP Articles


Lake Road Consulting Extensions Infor VISUAL Articles

https://www.gingerhelp.com/knowledgebase-epicor-erp/emailing-a-baq-report-from-a-customization 4/6
5/16/24, 3:24 PM Email an Epicor BAQ Report From Customization — GingerHelp

Sterling, OH P21 ERP Infor Dynamics 365


44276 USA Consulting VISUAL ERP Articles
Infor Extensions Crystal Reports
 VISUAL ERP Articles
support@gingerhelp.com Consulting SSRS Articles
Dynamics Bezlio for Mobile
365 ERP Articles
Consulting
SSRS
Developer
Services
Crystal
Reports
Consulting

GingerHelp is an
independent consulting
practice with no direct
© 2019 - 2023 GingerHelp,
affiliation with Epicor® or
LLC
Infor®.

Terms & Conditions |


Epicor®, Vantage®, and Privacy Policy
Prophet 21™ are registered
trademarks of Epicor
Software Corporation®.
Infor® and VIUSAL® are
registered trademarks of
Infor®.
Crystal Reports® is a

https://www.gingerhelp.com/knowledgebase-epicor-erp/emailing-a-baq-report-from-a-customization 5/6
5/16/24, 3:24 PM Email an Epicor BAQ Report From Customization — GingerHelp

registered trademark of SAP


AG.

https://www.gingerhelp.com/knowledgebase-epicor-erp/emailing-a-baq-report-from-a-customization 6/6

You might also like