Need Some Input - Auto Print

I’m stumped and looking for some help.

I want to auto print the Job Traveler from the Mass Issue to Mfg screen. I was trying to create a button and run code to do it, but that is proving hard. I originally wanted to use the auto print functionality but since there really is no good table to trigger it off of I went the other route.

I can’t think of a good way to trigger this, but I know someone on here probably has an answer. Any ideas are appreciated.

You can use this code for print preview the job traveler.

		Ice.Core.Session otSession = (Ice.Core.Session)this.oTrans.Session;
		String strWorkstationID = Ice.Lib.Report.EpiReportFunctions.GetWorkStationID(otSession);

		Erp.Proxy.Rpt.JobTravImpl report = WCFServiceSupport.CreateImpl<Erp.Proxy.Rpt.JobTravImpl>(otSession, Epicor.ServiceModel.Channels.ImplBase<Erp.Contracts.JobTravSvcContract>.UriPath);
		Erp.Rpt.JobTravDataSet ds = report.GetNewParameters();

		ds.JobTravParam[0].Jobs = jobNum;
		ds.JobTravParam[0].AutoAction = "SSRSPREVIEW";
		ds.JobTravParam[0].AgentSchedNum = 0;
		ds.JobTravParam[0].AgentID = "SystemTaskAgent";
		ds.JobTravParam[0].AgentTaskNum = 0;
		ds.JobTravParam[0].RecurringTask = false;
		ds.JobTravParam[0].RptPageSettings = "";
		ds.JobTravParam[0].RptPrinterSettings = "";
		ds.JobTravParam[0].RptVersion = "";
		ds.JobTravParam[0].ReportStyleNum = styleNum;
		ds.JobTravParam[0].WorkstationID = strWorkstationID;
		ds.JobTravParam[0].TaskNote = "";
		ds.JobTravParam[0].ArchiveCode = 0;
		ds.JobTravParam[0].DateFormat = "mm/dd/yyyy";
		ds.JobTravParam[0].NumericFormat = ",.";
		ds.JobTravParam[0].AgentCompareString = "";
		ds.JobTravParam[0].ProcessID = "";
		ds.JobTravParam[0].ProcessTaskNum = 0;
		ds.JobTravParam[0].DecimalsPrice = 0;
		ds.JobTravParam[0].GlbDecimalsGeneral = 0;
		ds.JobTravParam[0].GlbDecimalsCost = 0;
		ds.JobTravParam[0].GlbDecimalsPrice = 0;				
		ds.JobTravParam[0].SSRSRenderFormat = "PDF";

		report.RunDirect(ds);
2 Likes

@Yoonani Awesome!! It looks like it worked! I’ll have to check tomorrow when I am back in the office, but the task monitor shows it succeeded. I traced a server print and plugged in the extra values I needed. Thanks for taking the time to write up the code specific to my situation. It’s really appreciated.