Job Traveler Attachment Printing - 10.2

Hi all!

Recently I’ve been looking for a way to print job attachments with the job traveler so our planning department can release jobs a lot quicker rather than manually printing each attachment with each job.

Is there a way I can customize the job traveler to mass print each job, but before moving on to the next job, print the attachment?

I’ve messed around with some C# customization I found here on the forum, but there appears to be too many discrepancies with ERP 9 and ERP 10, and I’ve been hitting a wall with each method I try.
Any code examples or advice on this issue is much appreciated!

We have the exact same need. We are working with a consultant to assist us in implementation and this issue still has not been resolved. Not sure why this is such a difficult issue. The last ERP system I implemented, the software provider, gave us the solution the same day we asked,

EPICOR is very powerful, but not being able to simply implement this quickly is quite frustrating. We stated this requirement at the start of the project and we are now near go live and not yet resiolved,

As soon as we do, I will share our solution with you, If you have a solution, please let me know.

Right now, I have uploaded all the drawing attachments to each part. That was a simple DMT upload process that works very well.

I’ve written a dashboard that does this is not that hard a problem to solve. I’ll see if I can get something to share


Would love to see this code as we currently use a customised crystal report to do this.

Thank you for the reply’s everyone, @ahofmann I agree, it’s been a struggle to get any headway on the program.

@josecgomez Any information or code you can provide will go a long way! Thank you for your help :slight_smile:

Here’s the way we did this, I can provide some code but since this particular to us I don’t really want to upload the whole thing and cause confusion.

  1. We wrote a simple BAQ that returns Jobs Ready to Print (whatever criteria you want)
  2. Then we Added a Button which for each selected Job in the Grid Invokes the Job Traveler Print.
	foreach(var row in myGrid.Rows)
						var jobTravDs = jobTravSvc.GetNewParameters();
						var jobTravParamRecord = jobTravDs.JobTravParam[0];
						jobTravParamRecord.AgentID = "SystemTaskAgent";
			            jobTravParamRecord.AutoAction = "SSRSGenerate";
			            jobTravParamRecord.BarCodes = true;
			            jobTravParamRecord.Jobs = row.Cells["JobHead_JobNum"].Value as String;
			            jobTravParamRecord.NewPgPerAsm = true;
			            jobTravParamRecord.OpInstructions = true;
			            jobTravParamRecord.OprDates = true;
			            jobTravParamRecord.OprStd = true;
			            jobTravParamRecord.PrintSchedResources = true;
			            jobTravParamRecord.PrintSchedResrcDesc = true;
			            jobTravParamRecord.SSRSRenderFormat = "PDF";
			            jobTravParamRecord.SubAssem = true;
						jobTravParamRecord.SSRSEnableRouting = false;
			            jobTravParamRecord.TaskNote = instanceGuid.ToString();
						InvokeMsg(string.Format("Running Job Traveler for Job: {0}",   jobTravParamRecord.Jobs));

One of the things we do here is tag the “TaskNode” with a unique identifier to make it easier to find these jobs. We then wait until those jobs are done processing, this can take some time we wrote a BAQ that just checks to see how many of the Tasks with that “Unique ID” are still “ACTIVE” and we wait a few seconds and check again.

Once all those job travelers are done processing.
We run a BAQ that returns the generated Report SysRow ID along with the job Number from the Task

	[SysRptLst].[Company] as [SysRptLst_Company],
	(COUNT(SysTaskCt.SysTaskNum)) as [Calculated_CT]
from Ice.SysTask as SysTaskCt
where (SysTaskCt.TaskStatus in ('ACTIVE', 'PENDING')  and SysTaskCt.TaskNote = @TaskNote))),0)) as [Calculated_PendingCt],
	[SysRptLst].[SysRowID] as [SysRptLst_SysRowID],
	[SysTask].[TaskNote] as [SysTask_TaskNote],
	[SysTaskParam].[ParamCharacter] as [SysTaskParam_ParamCharacter]
from Ice.SysTask as SysTask
inner join Ice.SysRptLst as SysRptLst on 
	SysTask.Company = SysRptLst.Company
	and SysTask.SysTaskNum = SysRptLst.SysTaskNum
inner join Ice.SysTaskParam as SysTaskParam on 
	SysTask.SysTaskNum = SysTaskParam.SysTaskNum
	and ( SysTaskParam.ParamName = 'Jobs'  )

where (SysTask.TaskStatus in ('COMPLETE')  and SysTask.TaskNote like '%'+ @TaskNote+'%')
 and ((ISNULL(((select 
	(COUNT(SysTaskCt.SysTaskNum)) as [Calculated_CT]
from Ice.SysTask as SysTaskCt
where (SysTaskCt.TaskStatus in ('ACTIVE', 'PENDING')  and SysTaskCt.TaskNote = @TaskNote))),0)) = 0)

We then use that to retrieve the Report Content using the ReportMonitorAdapter , retrieve the Report Bytes and write it to a TempFile

using(ReportMonitorAdapter rmA = new ReportMonitorAdapter(oTrans))
						foreach(DataRow dr in ranTravelers.Tables["Results"].Rows)
							List<string> fileNames = new List<string>();
							byte[] rptData=rmA.GetReportBytes((Guid)dr["SysRptLst_SysRowID"]);
			 			   var tempPath = Path.GetTempPath();
							string fileName = Path.Combine(tempPath, string.Format("{0}.pdf",dr["SysRptLst_SysRowID"]));
							File.WriteAllBytes(fileName, rptData);

We then use a BAQ that returns all attachments from a given job and we use the attachmentService to Download / Retrieve the file and write it to a Temporary Location

	foreach(DataRow drAttch in dsAttch.Tables["Results"].Rows)
								InvokeMsg(string.Format("Processing Attachment {0} of {1}",ct,dsAttch.Tables[0].Rows.Count));	
								Dictionary<String,String> metaData = new Dictionary<String,String>();
								byte[] attchData = attachmentSvc.DocStarDownloadFile((int)drAttch["XFileRef_XFileRefNum"], ref metaData);
								string fn = Path.Combine(tempPath, string.Format("{0}.pdf", Guid.NewGuid()));
								File.WriteAllBytes(fn, attchData);

Finally we send all the files to the printer in order in which they were created.

1 Like

Also to note Epicor’s Job Traveler Attachments module actually works and the price was inexpensive. Not sure if it will however trickle to Kinetic.


After lots of back and forth with our consultant that is assisting us with implementation, I found through Google searching online, a Microsoft Web site for SSRS that provides “How to” in generally simple terms for those with intermediate-level experience the solution to adding drawing or other images files to print with a Job Traveller or any other document. See link to the site below!