We have a few bartender reports that we create a file through code and then save in a folder. How can I do this in Kinetic. My thought is to us the BAQ in an RDD and then create a csv report style. I was just curious if anyone else has had experience moving these into kinetic and what path you chose.
I created a Function that has the C# code from E10 and I just call the Function now behind a button.
I never gave functions a thought. If I am being honest I haven’t used functions yet. I am converting and learning kinetic at the same time.
Same here. Functions are just custom methods you can create. The first Function I created was to print labels to BarTender since I knew how to create and drop a file with C#. It took me a while to finally realize that I could do it with a Function, I tried other avenues first. As long as the screen you are on has some unique identifier to send as a parameter to your Function, you can then do whatever you want in the Function with C#.
@jkane I am working on this and slowly learning. Do you by chance give the user the ability to select the printer. One of the customizations is populating a combo box with a list of client printers and then uses that in the txt file. Any advice?
No, mine is only going to one printer.
I would have the selection be passed to the Function as a parameter.
I have that part where it takes the printer as a parameter. My issue is how in Kinetic customization can I populate that list.
Do you have the list stored somewhere? If not, I believe you should be able to create your own. I think you can create your own dataview or hijack one to use.
@hmwillett , can you chime in on how to create a drop down?
This is the rub. We don’t want to give the browser access to our client machines. Huge security no-no. You might be able to look into what the Edge Agent is doing and maybe hook into that to populate the list.
For the drop down, it depends on how you’re getting the data. If there’s a service that will list the client printers (doubtful), you can use the upper, reusable combo, section. Otherwise, you can tap into the bottom part where it allows you to add a list of items.
@hmwillett I know the security issues with browsers having access to client machines. I was hoping that because Epicor uses the Edge Client to get a list of printers by default they would give us something to grab that list. If I’m being honest I don’t know how to access or work with the Edge Agent. Does Epicor have documentation on this?
Hard to say. I’ve honestly stopped trying to find documentation on things. Tomorrow I’ll try and see if I can access the Edge Agent info. If I remember.
I understand completely. Thank you for all your help.
No dice with the Edge Agent.
I’m sure there’s a hacky way to get around it, but I didn’t put a whole lot of time to it.
This would be the URL to get the local printers: https://localhost:6076/Directives/Printing/printers (Or whatever port you used)
A somewhat ugly work around would be to use User Codes to hold the list. Far from automatic, but you could have someone in IT make a powershell script to find all the client printers, and create a DMT to update the User Codes. Just use the computer name as part of the Used Code, and the printer name/path as the Description.
Having the local machine name as part of the UC code would allow for filtering for just that machine. I’m assuming machine (or worskstation) name is still accessible in the client.
Depending on the situation/setup you have going on over there, it may make sense to share the local printers to your network. You can then use server-side stuff to get a list of printers they can print to.
They are shared. The concern is that a user will grab the wrong printer. I thought about using workstation but we use one user on the floor and that doesn’t work with workstation.
I remember oTrans.Session having taskclientID. Is there still such a thing? If I remember correctly this had the computer name I believe. If Epicor still has that and it is the computer name then I could use that in a UDtable to create a cross reference list and just simply assign the printer at that station.
I could propose that we use separate users at each MES but I am not sure I would get the go ahead for that. I love the ideas it has me thinking.
There is a big difference on getting a list of client printers, and providing access to the printers.
Shouldn’t be any real issue with populating a list of available bartender printers or client printers to epicor to query from to send to a function.
Of course he’ll either have to hard code that up, or build a solution to get that info IN to Epicor
So, this is above my head, but I figured out that the Epicor Edge Agent is actually QZ ( qz | Home). For more technically inclined users, there is some good documentation on their site. As an example, they give code to get a list of printers.
function findPrinters() {
qz.printers.find().then(function(data) {
var list = '';
for(var i = 0; i < data.length; i++) {
list += " " + data[i] + "<br/>";
}
displayMessage("<strong>Available printers:</strong><br/>" + list);
}).catch(function(e) { console.error(e); });
}