# Print Part Attachments When Mass Printing Job Travelers **Category:** [Epicor ERP 9](https://www.epiusers.help/c/e9/7) **Created:** 2016-10-20 15:18 UTC **Views:** 16268 **Replies:** 40 **URL:** https://www.epiusers.help/t/print-part-attachments-when-mass-printing-job-travelers/35894 --- ## Post #1 by @tyler We're on 905.701. We currently use Mass Print to print a number of Job Travelers at once. For each Traveler, we then manually print an Engineering Drawing (Part table attachment) for each manufactured part that is in the job BOM. We waste a lot of time printing the Engineering Drawings manually and want to automatically print them with each Job Traveler. From researching on here, it looks like the potential solutions are: -Crystal Report with OLE object tied to folder with all of our Engineering Drawings -APM/APM+ (we currently don't have either implemented, but are planning on doing so at some point) -3rd Party Software (Rob Bucek said he uses PlanetPress Watch) Does anyone have experience resolving this issue with either one of the above potential solutions or anything else? Suggestions? Thanks, Tyler Leonard --- ## Post #2 by @Jim_Lutz My company is interested in doing this as well; we're in exactly the same situation, but with version 702A. We're thinking of using APM (I think Plus is required, but I'll have to check on it) to pick up the part number and attach the drawing to it. Additionally, I think this can separate each traveler as a separate print job, so that they can be stapled and/or stacked separately with the drawing. --- ## Post #3 by @Krosell APM+ is definitely a working solution. You would have to do some Work to get the drawings into Doclink repository and then you can use the Supplemental Documents function. Using the OLE objects as I remember it will not work very well except in a limited fashion. I was the person responsible for the initial vantage and e9 integration with doclink and crystal as well as ssrs. The primary issue is being able to have a programming process to access those drawings and route them to the printer – doclink has that functional framework with the repository setup which requires APM+. There are definitely other options – After I Left Epicor I worked at an Epicor Customer here in Houston area- this company merged into a 2.7 billion $ company . One of the tasks we had in the IT group was to find a global solution for all locations for Document management including the Supplemental Documents type of concept which I was familiar… The IT Manager in charge of this project had me come into a meeting with the Copier Service organization that sold and serviced all our Printer/Copy machines in our region – I think at the time most of the copy machines were RICOH at least the new ones being purchased. This group demoed to the IT group the ability to do many of the Functions that doclink can do such as supplemental documents. I cannot remember the affiliation between the software developers and the copy machine manufactures or developers – meaning I don’t know if RICOH or the Distributor owned this product or just resold it . At the moment I do not remember the name of the product as it was 5 years ago but it is possible that if you have these big Full Featured copy / Print Machines in house and have Distributor or Service organization that works with you on these Machines – they may have knowledge of such software. I left Forum before this was ever implemented but I did get a demonstration that convinced me that moving forward would have provided what we needed. Regards, Kevin P Rosell Cell: (281) 615-5248 --- ## Post #4 by @Neil_Jones For info Dot Net have a Job Traveller Attachments print utility, it's an Epicor embedded solution so no need for separate software etc. --- ## Post #5 by @Bitman We are also on 9.05.701 and we use a C# customization to print the drawings. This is not exactly automatic in that the user must click a button we added to the Job Traveler report screen. The c# code gets all the attachments (identified by a specific DocType) for the jobs in the filter and sends it to the default printer of the user's system. Christian --- ## Post #6 by @greg.bakker CodaBears has a Job Packet Print Utility that looks like it will print the attachments with the Travelers. It looks like it can select the jobs marked for Mass Print. No, I don't work for CodaBears. :slight_smile: We are having them do some work for us and I happened to see it on their website: [http://www.codabears.com/Products/JobPacketPrint.aspx](http://www.codabears.com/Products/JobPacketPrint.aspx) We don't currently use the utility, but it looks like a useful tool. We earlier looked into using APM/APM+ to do this, but we didn't want to have to copy all of the part attachments to the APM repository. The newer versions of APM+ might be able to print external documents that aren't in the APM repository. --- ## Post #7 by @tyler Thanks for all the info y'all, very helpful. C# Customization - My coworker and I do some coding here, but don't have coding backgrounds (ie. we're not very good at it). Bitman, or anyone else with experience, is doing this via custom code pretty involved or would it be possible for mediocre coders? Crystal Report - May be a good band-aid solution. Our drawings are auto-exported out of SolidWorks as PDFs into a folder, then DMTd into Epicor daily. PDFs don't work well as OLE Objects. I'm guessing we could auto-export as PNGs as well and insert these as OLE Objects. Are there issues/concerns beyond this? What does "Using the OLE objects...will not work very well except in a limited fashion mean"? 3rd Party Application - Seems like there are a few companies that do this. Would be a bit wasteful though if you're planning on eventually doing APM/APM+. How have experiences been with CodaBears, Dot Net, and any of the other companies that provide this solution whether you used them for this solution or something else? APM/APM+ - Will try and research whether newer versions can print external documents that aren't in the APM repository. That seems like a function that could be useful here and beyond this application. Copy/Print Machines - Don't think we have a machine or a service organization like that, but that's an interesting idea. --- ## Post #8 by @Bitman Tyler, If you think you have enough coding skills to take our existing code and adapt it to fit your environment, I can share it with you. Just as you, we export our Solidworks drawings to pdf, but from what I understand you then import the pdf in your database. That is the part you would have to change because we only store file path (DocType = attachment link) in Epicor. Our code retrieves the path to the pdf file from the part revision attachment table and prints the file from the shared folder. --- ## Post #9 by @tyler Yea could you upload the code on this thread? I don't know if we'll be able to adapt it, but sure as hell would be easier than starting from scratch. --- ## Post #10 by @nhutchins This is something we have struggled with for quite a long time. Would love to see your code as well Bitman. Thanks, Norman Hutchins Systems Administrator Howell Laboratories, Inc. --- ## Post #11 by @Bitman Ok for those interested, here's how it works: (As english is not my native language, sorry if I make mistakes. I will try to describe the solution clearly.) Feel free to ask clarification if needed. We use the Autovue program to print the files. We can pass command lines arguments to have it read a text file which contains the paths of files we want to print. We use UD fields in the company table (shortchar04 and 05) to define the autovue executable path and the text file location on the workstation. We added a customization to the job traveler screen, added a button in the report options section and add the code to this customization. The user selects the jobs in the filter, prints the job traveler and click the button to print the drawings. Job travelers and drawings will need to be matched after printing is done. The code connects to the JobEntry BO to retrieve the attachments links from the JobAsmblAttch table, based on the DocType we want. We store this information in a temp table so we can filter out the duplicates (we don't want to print a drawing more than once), and then we generates the text file on the workstation, one path per line. Finallly, we send a command to have autovue read the file and print each path stored in it. Probably not the best solution, but this is working well for us, hope it can help some of you. Find the code attached. print_Job_attachments.cs (7.9 KB) --- ## Post #12 by @tyler Thanks Bitman. Looks pretty involved, so we're going to start by trying a Crystal Report with OLE Objects. Will let the group know if that works out. --- ## Post #13 by @utaylor Dot Net has a Job Traveler Solution that worked great for us in Epicor 9.05.702. They uplifted it to 10.1.500, but we have not installed it fully yet. I believe they merged with Epicor now. I found this link out there http://www.dotnetit.co.uk/solutions/solution/job-traveller --- ## Post #14 by @AlexD Hi Bitman, My name is Alex and I would like to thank you for sharing information on this challenge as I found it very useful in my case. However, as I am very new to Epicor system and a very Junior in programming, not everything is obvious to me. Is it possible to communicate with you and clarify a couple of moments? Or if you could just explain what are those values or rather where are they coming from (**"ENGRLINK", "DRAWLINK", "INSTR"**) you are checking for in the follow part of code that would be wonderful as well. "if(asar["DocTypeID"].ToString() == "ENGRLINK" || asar["DocTypeID"].ToString() == "DRAWLINK" || asar["DocTypeID"].ToString() == "INSTR")" Any help would be much appreciated! You can contact me here: odniprovskyi@hotmail.com Time Zone is EST. Thank you, Alex --- ## Post #15 by @josecgomez Please keep the communication on the site for the benefit of everyone. --- ## Post #16 by @AlexD Hi Jose, I ma not trying to hide anything or be selfish I just need to ask the person couple clarification questions, that's it and also I have modified my reply. I am new to the community so will learn a long the way. Thanks, Alex --- ## Post #17 by @josecgomez @AlexD Those are document types as setup in the Document Type Maintenance ![image|588x474](upload://sKUJyhTXbSkO5IG1A3IuDBa7hce.png) --- ## Post #18 by @Bitman Hi Alex, Like Jose said, these are Document types we have defined in the DocType table. ENGRLINK stands for Engineering Link, DRAWLINK is for our technical drawings, you get the idea... If you have any more question, feel free to post it, I will be glad to help if I can. Christian --- ## Post #19 by @AlexD Hey guys, I have tried some stuff for the last couple days but couldn't get anything sufficient. The thing is we do not have any Document Types set up as well as not using any third party apps to print Jobs in Job Traveler. However, I traced some logs when printed a preview and found next: false 2017-07-24T00:00:00-04:00 false true false false false false false true true R 064302 M0161 B 1224 headstock machining **And a bunch of XYZ info from JobHead Table printed.........** Here I found some interesting stuff: xyz 064302 9670 1910 54175122 292b0a6e-5569-4b46-9ba7-88a001e7c63f 7357bd7b-1fa4-4796-a74b-8645c53e830f M0161 headstock.dft N:\Drawing Files\12in mini\M0161 headstock.dft JobHeadAttch table is not in DB and I assume it's a temp table that is created while a printing preview process is in action (I might be wrong here though). Do you know guys if there is a way to set up a scenario like: 1) Place a custom button on a JobTravaler screen. 2) When the button is clicked just grab that path and send it to print to a whatever network printer is set up? If you guys could give a hint or a pointer where to look at that would be awesome and appreciated a lot! Thanks, Alex --- ## Post #20 by @Bitman Hi Alex, This is almost exactly what the code I posted does. As we don't want to print every attachment that may be present in the job, we use the document type only as a filter. So its not mandatory to make this work and these checks could be removed from the code. For direct printing, there is probably a way to do this, maybe others more knowledgeable than me in programming could help you find a way to do that. Christian --- ## Post #21 by @AlexD Hi guys, here is what I have achieved so far by adopting code for E10. I am breaking my case into the small parts and trying to implement them step by step but getting this error: "**Error: CS1501 - line 127 (254) - No overload for method 'GetRows' takes 27 arguments**" for this part of code: for(int x=0; x < edvJobList.dataView.Table.Rows.Count; x++) { JobEntryDataSet jobEntryDS = JobEntryBO.GetRows("JobNum = '" + edvJobList.dataView.Table.Rows[x] ["JobNum"].ToString() + "'" ,"","","","","","","","","","","","","","","","","","","","","","","",0,1,out morePages); } I do understand that something wrong with arguments for GetRows methods but after numerous tries and attempts to fix it unfortunatelly I couldn't. If somebody knows how to fix this or what's the problem any help would be very much appreciated. Thank you, Alex **Here is the code:** // ************************************************** // Custom code for JobTravForm // Created: 4/19/2018 4:31:39 PM // ************************************************** extern alias Erp_Adapters_JobEntry; using System; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Windows.Forms; using Erp.Adapters; using Erp.UI; using Ice.Lib; using Ice.Adapters; using Ice.Lib.Customization; using Ice.Lib.ExtendedProps; using Ice.Lib.Framework; using Ice.Lib.Searches; using Ice.UI.FormFunctions; using System.IO; using System.Collections.Generic; using Erp.BO; using System.Text; using Ice.Core; using Erp.Proxy.BO; public class Script { // ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! ** // Begin Wizard Added Module Level Variables ** private EpiDataView edvJobList; private EpiDataView edvAsmList; // End Wizard Added Module Level Variables ** // Add Custom Module Level Variables Here ** StringBuilder Texte = new StringBuilder(); public void InitializeCustomCode() { // ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines ** // Begin Wizard Added Variable Initialization edvJobList = ((EpiDataView)(this.oTrans.EpiDataViews["jobList"])); edvAsmList = ((EpiDataView)(this.oTrans.EpiDataViews["assemblyList"])); // End Wizard Added Variable Initialization // Begin Wizard Added Custom Method Calls this.epiButtonC1.Click += new System.EventHandler(this.epiButtonC1_Click); // End Wizard Added Custom Method Calls } public void DestroyCustomCode() { // ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines ** // Begin Wizard Added Object Disposal edvJobList = null; edvAsmList = null; this.epiButtonC1.Click -= new System.EventHandler(this.epiButtonC1_Click); Texte = null; // End Wizard Added Object Disposal // Begin Custom Code Disposal // End Custom Code Disposal } private void JobTravForm_Load(object sender, EventArgs args) { // Add Event Handler Code SetVersionNumber(JobTravForm); } private void SetVersionNumber(EpiBaseForm form) { string custName = oTrans.EpiBaseForm.CustomizationName; string version = "?.?"; if ( custName.LastIndexOf("_") >= 0 ) { version = custName.Substring(custName.LastIndexOf("_") + 1, custName.Length - custName.LastIndexOf("_") - 1); } form.Text = form.Text + " - Version " + version; } private void epiButtonC1_Click(object sender, System.EventArgs args) { // ** Place Event Handling Code Here ** if(edvJobList.dataView.Table.Rows.Count > 0) { Ice.Core.Session epiSession = default(Ice.Core.Session); epiSession = (Ice.Core.Session)JobTravForm.Session; bool morePages = false; JobEntryAdapter JobEntryBO = new JobEntryAdapter((Ice.Core.Session)oTrans.Session); //Table temporaire pour filtrer les lots DataTable tempTable = new DataTable(); tempTable.Columns.Add("JobNum", typeof(string)); tempTable.Columns.Add("PartNum",typeof(string)); tempTable.Columns.Add("FileName",typeof(string)); tempTable.Columns.Add("AsmSeq", typeof(string)); tempTable.Columns.Add("ParentPart", typeof(string)); foreach (var value in tempTable.Columns){ MessageBox.Show(value.ToString()); } for(int x=0; x < edvJobList.dataView.Table.Rows.Count; x++){ JobEntryDataSet jobEntryDS = JobEntryBO.GetRows("JobNum = '" + edvJobList.dataView.Table.Rows[x]["JobNum"].ToString() + "'" ,"","","","","","","","","","","","","","","","","","","","","","","",0,1,out morePages); } } else { MessageBox.Show("Test"); } } } --- ## Post #22 by @Bitman Hi Alex, I compared your line of code side by side with mine and it is exactly the same. Have you verified the jobnum you get as a parameter ? I would probably create a string variable and a message box just before the getRows call, to get the jobnum like this: string jobNum = edvJobList.dataView.Table.Rows[x]["JobNum"].ToString(); MessageBox.Show(jobNum); Or you can use visual studio in debugging mode also. I see your code is for E10, I don't know if there is differences in the implementation. I haven't started to work code for E10 yet, but I have it installed for testing. I used the Business Logic Tester (great tool) to quickly verify the arguments. Seems to be the same as I what have in 9.05... Sorry If i'm am not of much help on this one, but again I am not a developer, just an admin who loves playing with code. --- ## Post #23 by @suteraj20 The easiest and cheapest solution is to display the attachments into the job traveler itself. there is a way to automatically pull the drawings from the BOM onto the job when the job is confirmed. then using the xfileattach table, you can pull in the drawings using an OEL object in crystal using the path that is stored in that table. This is how we do it. --- ## Post #24 by @AlexD Hi Christian, Thanks for your response. I have verified **jobnum** like you proposed and I am getting a correct **jobnum** which I selected as well as other parameters like **PartNum**. I am about to use Visual Studio to debug also. Now I am thinking about a way to access Ice.XFileRef table which contains XFileName Column with a path **(i.e. N:\Drawing Files\12in mini\M0161 headstock.dft)**. Then, I want to check if any of those columns **Contain** a part number and if it returns true, I want to pass that path to a network printer. Let me check out what is Business Logic Tester as see this name the first time. I appreciate any help and no matter how big it is. We all here to share experience and help each other as much as we can! Thanks, Alex --- ## Post #25 by @AlexD Hi Jeff, We are not using Crystal report, only SSRS and as far as I explored it's not possible to pull a drawing by a custom expression in SSRS. Actually, Ice.XFileRef table in my case is what I need but now I am researching if there is a way to access it through a customization. Do you know any ways to achieve this? Thanks, Alex --- ## Post #26 by @Bitman If you want use the Xfileref table, you will need first to access the xFileattach table which contains all attachement entries for every tables. The RelatedToFile Field contains the table name to which the attachment is related to. As an example, if you want Job Assembly attachements, the required parameters for xFileAttach will be like this: Company = cur-comp RelatedToFile = JobAsmbl (you specify here the table you need, Parts, Customer, QuoteHed, QuoteDtl, ...) Key1 = [yourjobNum] (Depending on the table, Partnum, CustNum, QuoteNum...) Key2 = [yourAssemblySequence] Then, you will link the xFileRef Table by xFileRefNum and you can access the XFilename. You can take a look in the data dictionary for more complete explanation of the fields. For the Business Logic tester, look on your server in the utilities folder, there should be a folder named BL tester. I like this tool to quickly test BO methods an see the data it brings back. --- ## Post #27 by @AlexD Hi Christian, Thanks for reply and explanation regarding my approach of doing things. After some testing that I have done, I found that my approach with xFileAttch and xFileRef tables is not very convenient. Instead I think that I need to follow your code to get to this point: foreach(DataRow ar in jobEntryDS.Tables["JobHeadAttch"].Rows) { if(hr["jobnum"].ToString() == ar["jobnum"].ToString()) { but here: **if(hr["jobnum"].ToString() == ar["jobnum"].ToString())** // I think here I can perform a slightly different check, like : if(ar["FileName"].ToString().Contains(hr["PartNum"]).ToString()) { send a file from the path specified in FileName field to a printer (i.e. N:\Drawing Files\12in mini\M0161 headstock.dft) } However, to get to aforementioned step I need to resolve that error I am getting: "**Error: CS1501 - line 127 (254) - No overload for method 'GetRows' takes 27 arguments**" Any thoughts? --- ## Post #28 by @AlexD Hi Jose, Thanks for your pointer on Document Type Maintenance. We got some talking with Christian regarding my situation. If you got a minute wouldn't you mind to review and comment my situation and probably advise an approach to take? Thanks, Alex --- ## Post #29 by @Bitman Alex, I tried your code in my E10 test system, and got the same error as you. I tested with the BLTester, and the number of arguments is the same. But after digging through some post here, I think I know what is the issue. If I'm right, the GetRows method changed in E10, and it needs to be called like this: GetRows(searchOpts, morePages) where searchOpts is a variable that contains the required arguments. As I am not familiar with using this, I will have to look into this a little bit to get it to work. I'll keep you posted. --- ## Post #30 by @Bitman Here we go, I had to change a few things but I think I managed to resolve this part. Try this code: private void epiButtonC1_Click(object sender, System.EventArgs args) { // ** Place Event Handling Code Here ** if(edvJobList.dataView.Table.Rows.Count > 0) { Ice.Core.Session epiSession = default(Ice.Core.Session); epiSession = (Ice.Core.Session)JobTravForm.Session; JobEntryAdapter JobEntryBO = new JobEntryAdapter(oTrans); JobEntryBO.BOConnect(); //Table temporaire pour filtrer les lots DataTable tempTable = new DataTable(); tempTable.Columns.Add("JobNum", typeof(string)); tempTable.Columns.Add("PartNum",typeof(string)); tempTable.Columns.Add("FileName",typeof(string)); tempTable.Columns.Add("AsmSeq", typeof(string)); tempTable.Columns.Add("ParentPart", typeof(string)); foreach (var value in tempTable.Columns){ MessageBox.Show(value.ToString()); } for(int x=0; x < edvJobList.dataView.Table.Rows.Count; x++) { Ice.Lib.Searches.SearchOptions opts = new Ice.Lib.Searches.SearchOptions(SearchMode.AutoSearch); string whereClause = string.Format("JobNum = '" + edvJobList.dataView.Table.Rows[x]["JobNum"].ToString() + "'"); opts.PageSize = 0; opts.AbsolutePage = 1; opts.NamedSearch.WhereClauses.Add("JobHead",whereClause); opts.DataSetMode = Ice.Lib.Searches.DataSetMode.RowsDataSet; bool morePages = false; var jobEntryDS = (Erp.BO.JobEntryDataSet)JobEntryBO.GetRows(opts,out morePages); foreach(DataRow hr in jobEntryDS.Tables["JobHead"].Rows) { MessageBox.Show(hr["JobNum"].ToString()); } } } else { MessageBox.Show("Test"); } } I have added the code for the first foreach loop in JobHead with a messagebox showing the jobnum as a way of testing. Based on what I experienced tonight, there seems to be quite a few differences with the way of coding in E10, so it needs a little love to make the E9 code work.:wink: and you know what the funny thing is ? I am currently working to put things in place at work to stop printing the drawings, it will be displayed on MES screen through the JobTracker instead. So in the end, I won't have to adapt this customization in E10 ! :rofl: Let me know how it worked for you. P.S. I would also give a tip of the hat to @josecgomez because almost each time I'm stuck on something, I end up on some of his answers on this forum and the solution is there. This was the case 2 times tonight while working on this issue. Man, you are the master ! --- ## Post #31 by @AlexD Hi Christian, Thank you very much for your help and time on investigating my situation. I really appreciate your help! I looked at your code and have to say that I was also on a right track but was confused at the specifying **opts** arguments. I tried your code and thank you it worked. I will try to go into next table which is: jobEntryDS.Tables[“**JobHeadAttch**”].Rows by another **foreach** and see how it goes and what I will be getting from there. Regarding MES screen, out of curiosity, how will you pass drawing from JobTraveler to MES and how it will be shown? P.S. I also faced a lot of useful materials provided by Jose @josecgomez and they were tremendously helpful. Thank you Jose for your contributions. --- ## Post #32 by @Bitman In phase 1 of our "paperless" project, we will only stop printing the drawings but we will still print the Job travelers. People on the plant floor who needs to see the drawings will use the job tracker in their MES to access it. To make it more convenient and quick to use, I customized the Job tracker by adding a "drawings" tab. I used custom code to gather all drawings attachments path for all assemblies in the current job and list it in a grid. I modified the grid's "FileName" column property to make the cell clickable (URL type), so when clicked, the document opens in the program associated to its extension on the computer. ![image|690x226](upload://6OyGVdBEcSrwFWmWuVtIshcEfPM.png) Most of our drawings are done with Solidworks but a copy is saved in pdf. That's what we use in Epicor. We also still have some old drawings done in dft, those are opened using Autovue. --- ## Post #33 by @AlexD Hi Christian, Sorry for not being responsive for a quite some time but we are crazy busy with migration to 10.2. About drawings, it worked and I am now having a path for our drawing. Thank you so much for your help! Now it's just find a way to pass that to a printer, but hope it's minor. Regarding MES, that's an interesting solution. I think I might do something similar in the future. Thanks once again! Alex --- ## Post #34 by @A.Baeisa much appreciated if you can share this UI custom code here, thanks in advanced --- ## Post #35 by @Bitman Here it is: ```cs // ************************************************** // Custom code for JobTrackerForm // Created: 23-04-18 12:46:12 par Christian Duguay // ************************************************** using System; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Windows.Forms; using Epicor.Mfg.BO; using Epicor.Mfg.UI; using Epicor.Mfg.UI.Adapters; using Epicor.Mfg.UI.Customization; using Epicor.Mfg.UI.ExtendedProps; using Epicor.Mfg.UI.FormFunctions; using Epicor.Mfg.UI.FrameWork; using Epicor.Mfg.UI.Searches; public class Script { // ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! ** // Begin Wizard Added Module Level Variables ** // End Wizard Added Module Level Variables ** // Add Custom Module Level Variables Here ** private EpiDataView edvJobHead; private DataTable jobAttachTbl; public void InitializeCustomCode() { // ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines ** // Begin Wizard Added Variable Initialization this.edvJobHead = ((EpiDataView)(this.oTrans.EpiDataViews["JobHead"])); this.eugDessins.AfterCellActivate += new System.EventHandler(this.eugDessins_AfterCellActivate); this.edvJobHead.EpiViewNotification += new EpiViewNotification(this.edvJobHead_EpiViewNotification); // End Wizard Added Variable Initialization // Begin Wizard Added Custom Method Calls // End Wizard Added Custom Method Calls } public void DestroyCustomCode() { // ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines ** // Begin Wizard Added Object Disposal this.edvJobHead.EpiViewNotification -= new EpiViewNotification(this.edvJobHead_EpiViewNotification); // End Wizard Added Object Disposal // Begin Custom Code Disposal this.edvJobHead = null; jobAttachTbl = null; this.eugDessins.AfterCellActivate -= new System.EventHandler(this.eugDessins_AfterCellActivate); // End Custom Code Disposal } public void GetAttachData() { try { string strJobNum = edvJobHead.dataView[edvJobHead.Row]["JobNum"].ToString(); //MessageBox.Show(strJobNum); jobAttachTbl = new DataTable(); DataRow myDataRow; jobAttachTbl.Columns.Add("AssemblySeq",typeof(string)); jobAttachTbl.Columns.Add("PartNum",typeof(string)); jobAttachTbl.Columns.Add("FileName",typeof(string)); Epicor.Mfg.Core.Session epiSession = default(Epicor.Mfg.Core.Session); epiSession = (Epicor.Mfg.Core.Session)JobTrackerForm.Session; ///Use BO bool morePages = false; JobEntry jobEntryBO = new JobEntry(((Epicor.Mfg.Core.Session)oTrans.Session).ConnectionPool); JobEntryDataSet jobEntryDS = jobEntryBO.GetByID(strJobNum); foreach(DataRow jobHeadRow in jobEntryDS.Tables["JobHead"].Rows) { foreach(DataRow jobHeadAttachRow in jobEntryDS.Tables["JobHeadAttch"].Rows) { if(jobHeadAttachRow["DocTypeID"].ToString() != "ENGRLINK") { //MessageBox.Show(jhAttach["FileName"].ToString()); myDataRow = jobAttachTbl.NewRow(); myDataRow["AssemblySeq"] = "--"; myDataRow["PartNum"] = jobHeadRow["PartNum"]; myDataRow["FileName"] = jobHeadAttachRow["FileName"]; jobAttachTbl.Rows.Add(myDataRow); } } foreach(DataRow jobAsmblRow in jobEntryDS.Tables["JobAsmbl"].Rows) { foreach(DataRow jobAsmblAttachRow in jobEntryDS.Tables["JobAsmblAttch"].Rows ) { if(jobAsmblAttachRow["DocTypeID"].ToString() != "ENGRLINK") { if(jobAsmblAttachRow["AssemblySeq"].ToString() == jobAsmblRow["AssemblySeq"].ToString()) { //MessageBox.Show(jhAttach["FileName"].ToString()); myDataRow = jobAttachTbl.NewRow(); myDataRow["AssemblySeq"] = jobAsmblRow["AssemblySeq"].ToString(); myDataRow["PartNum"] = jobAsmblRow["PartNum"]; myDataRow["FileName"] = jobAsmblAttachRow["FileName"]; jobAttachTbl.Rows.Add(myDataRow); } } } } foreach(DataRow jobMtlRow in jobEntryDS.Tables["JobMtl"].Rows) { if(jobEntryDS.Tables["JobMtlAttch"].Rows.Count > 0) { //MessageBox.Show("JobMtlAttch Pas vide"); foreach(DataRow jobMtlAttchRow in jobEntryDS.Tables["JobMtlAttch"].Rows) { if(jobMtlAttchRow["DocTypeID"].ToString() != "ENGRLINK") { myDataRow = jobAttachTbl.NewRow(); myDataRow["AssemblySeq"] = jobMtlRow["AssemblySeq"].ToString(); myDataRow["PartNum"] = jobMtlRow["PartNum"]; myDataRow["FileName"] = jobMtlAttchRow["FileName"]; jobAttachTbl.Rows.Add(myDataRow); } } } } } eugDessins.DataSource = jobAttachTbl; eugDessins.Dock = DockStyle.Fill; //eugDessins.DisplayLayout.Bands[0].Columns["PartNum"].Width = 300; //eugDessins.DisplayLayout.Bands[0].Columns["FileName"].Width =550; eugDessins.DisplayLayout.AutoFitStyle = Infragistics.Win.UltraWinGrid.AutoFitStyle.ExtendLastColumn; eugDessins.DisplayLayout.Bands[0].Columns["Filename"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.URL; //eugDessins.DisplayLayout.Bands[0].Columns["AssemblySeq"].Width = 50; jobEntryDS.Clear(); jobEntryDS.Dispose(); } catch(Exception ex) { MessageBox.Show(ex.ToString()); } } private void eugDessins_AfterCellActivate(object sender, System.EventArgs args) { //MessageBox.Show(args.Value.ToString()); } private void edvJobHead_EpiViewNotification(EpiDataView view, EpiNotifyArgs args) { // ** Argument Properties and Uses ** // view.dataView[args.Row]["FieldName"] // args.Row, args.Column, args.Sender, args.NotifyType // NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes if ((args.NotifyType == EpiTransaction.NotifyType.Initialize)) { if ((args.Row > -1)) { GetAttachData(); } } } } ``` --- ## Post #36 by @peteradams Hi all! I know it's been some time since this thread's been active, but I was just wondering if anybody was able to achieve a solution to this in 10.2. I've been trying multiple methods but seem to hit a wall each time. I am looking to create a button on the job traveler which automatically prints the job attachment with the job. Any insight or code examples would be greatly appreciated! --- ## Post #37 by @Bray.Christopher This is probably SUPER late, but.... we are on 10.2.700.13 We use "Print with Attachments". I think this is "standard" now. We had to fight to make it a reality. We attach drawings to the Rev of the Part. Then when the job is created Epicor pulls the attachments on the Revs on the Job as part of the Get Details process. This works for us when printing single job travelers or mass printing. And it "interleaves" the drawings with the sub-assembly they go with. ![image|483x500](upload://u3cSzijoXndlQVWn1UrJzd6pGDn.png) --- ## Post #38 by @josecgomez [quote="Bray.Christopher, post:37, topic:35894"] I think this is “standard” now. [/quote] This is not standard that's a customization or a base extension you have. There is a product you can / could buy from Epicor Dot Net IT that did this, which is what I'm guessing you guys got. --- ## Post #39 by @Bray.Christopher Well. Poo. It **should** be standard. I thought it was absolutely ridiculous that it wasn't. When the Epicor sales people were here showing off the software, we asked them if we could attach drawings. They said, "of course". And we were ecstatic. Then we discovered that you couldn't do anything useful with them. Thanks Epicor. Then our IT guy stumbled upon this Print with Attachment customization. It was a pre-built customization that we could buy "off the shelf". But it just dumped all the drawings at the end of the Job Traveler. It didn't marry up the drawings with the correct subassembly. That was another fight. I will ask our IT guy where it came from? In my opinion, everyone should have it. Unless you are already "paperless". --- ## Post #40 by @ahofmann We were told the same thing by Sales that sold us EPICOR. We found a solution on our own to attach drawings to Job Travellers when printing them. See link to my post on another thread. I would love the ability to have the drawing print with the Job Traveller based upon adding the attachments to the parts rev table. We have that setup now for viewing paperless but our production operators still need a paper copy of the Job Traveller that is attached to the actual parts, along with the drawing. More efficient to have paper copies at times. https://www.epiusers.help/t/job-traveler-attachment-printing-10-2/83689/8?u=ahofmann --- ## Post #41 by @MikeGross [quote="Bray.Christopher, post:39, topic:35894"] I will ask our IT guy where it came from [/quote] It's been mentioned on here numerous times, but is harder and harder to find now - and I'm not sure how they are moving these things to Kinetic. Call your CAM and ask for the CSG Extensions for Job traveler printing. You can see it here in EpicWeb: ![image|411x500](upload://2vIga10fk5XzCPyOz2OQ4CtN8YE.png) --- **Canonical:** https://www.epiusers.help/t/print-part-attachments-when-mass-printing-job-travelers/35894 **Original content:** https://www.epiusers.help/t/print-part-attachments-when-mass-printing-job-travelers/35894