Submitting BAQ Report to Agent

You need to declare an BAQ object, connect to it, get a parameter dataset, populate it and then call the submittoagent.

// very high level, additional steps are needed.
Epicor.Mfg.Rpt.BAQReport ReportObj;

// in Epicor 9, or at least the version I have the form.session.xxx
// doesn't work so to get a reference to the session object we have
// to make a cast
Epicor.Mfg.Core.Session s = (Epicor.Mfg.Core.Session)SalesOrderTrackerForm.Session;
// replace salesordertrackerform with the form you are currently in

ReportObj = new Epicor.Mfg.Rpt.BAQReport(s.ConnectionPool);
Epicor.Mfg.Rpt.BAQReportDataSet dsReport = new Epicor.Mfg.Rpt.BAQReportDataSet();
dsReport = ReportObj.GetNewBAQReportParam(BAQRptID);

... populate dsReport, use trace log for examples of what is needed

ReportObj.SubmitToAgent(dsReport,"System TaskAgent",0,0,"Epicor.Mfg.UIRpt.BAQReport;BAQReportNamegoeshere");

Jim Kinneman
Senior Consultant
Encompass Solutions

--- In vantage@yahoogroups.com, "drew.pete" <drew.pete@...> wrote:
>
> I'm exploring the option of sending a BAQ report to the agent at will. I ran a trace log after selecting "Print Preview" of a known BAQ Report and got the following....
>
> <businessObject>Epicor.Mfg.Rpt.BAQReport</businessObject>
> <methodName>SubmitToAgent</methodName>
> <returnType>void</returnType>
> <localTime>4/7/2010 08:03:04:4737254 AM</localTime>
> <executionTime>46.8747</executionTime>
> <parameters>
>
> There is a lot more to it due to I wrote the whole dataset to the log (filters, parameters, etc). Right now I have a button set up in the script editor to test. I looked in the adapter list but I don't see an adapter for it. Has anyone done anything like this? I've started with an Imports Epicor.Mfg.Rpt.BAQReport. I'd imagine the next step would be to declare that as an object - then invoke the method "SubmitToAgent" and pass the parameters necessary. Any ideas on where to go from there?
>
> Thanks,
>
> Drew
>
I'm exploring the option of sending a BAQ report to the agent at will. I ran a trace log after selecting "Print Preview" of a known BAQ Report and got the following....

<businessObject>Epicor.Mfg.Rpt.BAQReport</businessObject>
<methodName>SubmitToAgent</methodName>
<returnType>void</returnType>
<localTime>4/7/2010 08:03:04:4737254 AM</localTime>
<executionTime>46.8747</executionTime>
<parameters>

There is a lot more to it due to I wrote the whole dataset to the log (filters, parameters, etc). Right now I have a button set up in the script editor to test. I looked in the adapter list but I don't see an adapter for it. Has anyone done anything like this? I've started with an Imports Epicor.Mfg.Rpt.BAQReport. I'd imagine the next step would be to declare that as an object - then invoke the method "SubmitToAgent" and pass the parameters necessary. Any ideas on where to go from there?

Thanks,

Drew