E10 Autoprint C#

Ah I see.  I just saw the options in the sysmon trace.  I'm starting to think its not the code that is the issue.  Even BPM auto-print/auto-preview just hangs in the queue.

I had this little piece of code that I borrowed from Jose working on E9 no problem.  Now I'm not quite sure what is going wrong in E10.  I tried adding more parameters and changing some of them to different settings with no luck.  The only thing that I can make show is if I change the AutoAction to preview.  It works fine that way but the AutoAction print doesnt want to work.


Anyone have any ideas?


Thanks.


Erp.Proxy.Rpt.PackingSlipPrintImpl psp = WCFServiceSupport.CreateImpl<Erp.Proxy.Rpt.PackingSlipPrintImpl>((Ice.Core.Session)oTrans.Session, Epicor.ServiceModel.Channels.ImplBase<Erp.Contracts.PackingSlipPrintSvcContract>.UriPath);

    PackingSlipPrintDataSet psds= psp.GetNewParameters();

    psds.PackingSlipParam[0].ReportStyleNum=1003;

   psds.PackingSlipParam[0].PackNum = 0;

   psds.PackingSlipParam[0].PackNumList = PackNum;

   psds.PackingSlipParam[0].PrintingOptions="S";

   psds.PackingSlipParam[0].AssignLegalNumber=false;

   psds.PackingSlipParam[0].EnableAssignLegalNumber=false;

   psds.PackingSlipParam[0].AgentID="SysAgent";

   psds.PackingSlipParam[0].ArchiveCode=0;

   psp.PackNumDefaults(psds);

   psds.PackingSlipParam[0].AutoAction ="Print";

   psds.PackingSlipParam[0].StyleNumExt =1;

string identity = System.Diagnostics.Process.GetCurrentProcess().SessionId.ToString();

psds.PackingSlipParam[0].WorkstationID= Environment.MachineName + " " + identity;

    psds.PackingSlipParam[0].PrinterName = @"\\F01\East Warehouse Printer";

psds.PackingSlipParam[0].RptPrinterSettings = "PrinterName='\\\\F01\\East Warehouse Printer',Copies=1,Collate=False,Duplex=Simplex,FromPage=0,ToPage=0";

    psp.SubmitToAgent(psds,"SysAgent",0,0, "Erp.UIRpt.PackingSlipPrint");



Not in a system or have an exact example handy at the moment but if you run a trace when printing from a report with the options you want to use it will list the exact answers you need.

I believe for the AutoAction it needs to be something like SSRSPRINT. 

Jim Kinneman
Encompass Solutions, Inc
It's actually a crystal report that it's trying to print.  I don't know if that matters.

I actually added every parameter available from the trace before I posted this.  I just removed it from the post to clean it up.  I was thinking it was the "Print" autoaction that was the issue.  

Does anyone know how to find all the options available for the AutoAction?  


From what I'm aware AutoAction can be ("PRINT", "PREVIEW", "AUTOPRT","AUTOPRV", or just blank "")