Bartender Commander Confusion

Greetings, everyone.

Does anyone know where the Bartender Commander (or, in fact, the entire Bartender install) needs to reside in order to ensure label printing within Epicor from any Epicor client on the domain?

In my testing environment, I had installed the Bartender application on my own workstation - and this includes the Bartender Commander module. I have also constructed a label template that correctly connects to the Epicor DB. All of the report style and report data definition configurations have been prepared. My testing has been largely successful when issuing a “Print Labels” command from within Epicor:

print-labels-menu

However, if a print command is issued from a different workstation using the same module/report, the print job is sent back to the label printer that resides on my desk, instead of the label printer at the workstation where the print job was requested. It is helpful to note that the other workstation has its own label printer installed locally with its own set of drivers. The “Print Labels” command shells out to the Windows OS printer dialog which allows the user to select the printer he/she needs - and the user is picking the correct locally installed printer:

label-printer-selection

Sadly, the print job is sent to my label printer instead of the one at the other workstation.

This makes be believe that Bartender Commander needs to act like a “server application”, where it is installed, perhaps, on either the Epicor ERP server, or the domain’s print server in order to handle Bartender-based print requests. Also, if the only BT Commander install/presence resides on my workstation, would that not affect the general nature of Bartender printing for everyone else when my workstation is powered down? I’m guessing, yes.

What is the best practice Bartender/BT Commander install for multi-user printing requirements on the domain?

Commander is part of the installation for Bartender. It needs to go installed on the server where your .bt files are going to be sent to… its licensed per printer…

Just to clarify – the Bartender install needs to be located on the same server where the *.bt templates are stored and our company would need to purchase a license for each printer that is being used for Bartender printing purposes, correct?

Correct… it makes things easier having it everything installed on one server, including the printers that the files are going to print to…also bartender sells license packages of 5 and it is per printer…

are you creating custom code to generate the .bt files.

FWIW, we found the built in barteder functionality in epicor pretty much useless. We didn’t have the flexibility needed to change what was sent to bartender, and I didn’t even get into trying to manage different printers because, like you’ve found, I don’t think you can use the normal print windows with commander.

Jeff:

Negative. We had created a Report Def/Report Style that points back to a BT template we designed. So, in the Epicor “Print Labels” dialog, the user will see, by default, the correct report style to select. Once that is selected, Epicor shells out to the Windows OS print dialog in order to choose the label printer destination.

If there is a custom code method that works better, I’d be interested in seeing that approach.

Brandon:

Thanks for the heads-up on that. Yeah, the printing aspect of this project is the only sticking point I’ve had. I can encode to whatever SSRS form I need. I can scan and decode and programmatically insert multiple data points into any Epicor module. But, when it comes to what should be the easiest thing in the world to do (and they’ve even developed a whole label software program to help me out :laughing:), I can’t print… well… I can - but not in the manner my company requires.

That’s interesting. We were told that you can’t change it. Guess we got some wrong information.

This thread walks through what I did for some custom coding. There is a lot just hard coded in there, so it’s not real elegant, but it’s gets you the basis of one way to create a CSV file to drop the file in. If you get more creative with a header in the file (which I have not tried) you can more elegantly control the printer and other aspects of the bartender commander.

1 Like

I may be referring to something completely different, but the the resulting Report Style (we called this particular one a “receiver label”) is available in that dialog, like so:

receiver-label

As mentioned, this does print on my own workstation label printer – but not if that same report style is selected by someone working from a completely different workstation. Their print job also gets printed on my label printer - not their own.

EDIT – forgot to mention, I’ll take a look at the information in the thread you linked and see if that might help us out. Thanks for being gracious and offering some advice, Brandon. I appreciate that.

I learn way more that I give on here. Happy to help. And I’m not an expert on anything, so if I give bad advice, sorry. :grimacing:

Well… you’re off the hook, because I don’t think I can say to my supervisor, “well - Brandon from an Internet forum told me this would work!” :laughing:

(I could… but It’d be a resume-generating discussion)

1 Like

image

1 Like

this is how we do our bartender files. We store the file location on the site and each user can set which printer they want to have specific label sizes printed to.

		string filePrefixName = "\\JobPart1x4-Label-";
		string printerName = getPrinterName46(CompanyName, UsrID);
		string reportName = getReportLabelFullPath(CompanyName, "JobPart1x4Label");
			string btFileName = getUniqueBTFullPath(CompanyName, filePrefixName);

			OrderedDictionary stuff = new OrderedDictionary
			{
				{"PartNum", PartNum},
				{"Qty", tempQtyPer},
				{"Warehouse", WarehouseCode},
				{"Bin", BinNum},
				{"PartRev", PartRev},
				{"JobNum", LotNum}
			};
				

			outputBT(stuff, btFileName, reportName, printerName, 1);

	public void outputBT(OrderedDictionary input, string btFileName, string reportName, string printerName, string numCopies = "1")
	{
		using (StreamWriter output = new StreamWriter(btFileName))
		{

			output.WriteLine("%BTW% /AF=\"" + reportName + "\" /D=\"<Trigger File Name>\" /PRN=\"" + printerName + "\" /DBTEXTHEADER=3 /R=3 /P /C=" + numCopies);
			output.WriteLine("%END%");
			string header = "";
			string body = "";
			string headerDelimiter = "";
			string bodyDelimiter = "\"";
			foreach (var key in input.Keys)
			{
				header += headerDelimiter + key;
				body += bodyDelimiter + input[key];
				headerDelimiter = ",";
				bodyDelimiter = "\",\"";
			}
			body += "\"";
			output.WriteLine(header);
			output.WriteLine(body);
		}
	}
2 Likes

Jeff:

Thanks for including your custom approach here. I’ll certainly take at look at this and see if it might also be an option for our environment. It might take me a few days, but I’ll post back to the thread concerning my progress. Enjoy the upcoming weekend.

I was able to formulate a bit of C# code that appears to build the “*.bt” file properly and place that file where the BT Commander script has also been configured to look.

The simple output I have in the “*.bt” file looks like this:

%BTW% /AF=“\SERVER\VOLUME$\EpicorData\Bartender\OUTPUT” /D=“” /PRN=“DYMO LabelWriter 450 Turbo” /DBTEXTHEADER=3 /R=3 /P /C=2
%END%
“PONum”,“PackSlip”,“PartNum”,“BinNum”
63939,12345-C,CS-MISC,SC-CAB-01

So, the output file looks like it’s pulling data correctly.

The BT Commander detects the file and renames it from “.bt" to ".btw” - and I see this happening in the OUTPUT folder on the server, but the print job never reaches the label printer. There are no errors and there is no indication that data packets have reached the label printer.

I suspect that there is an issue with my BT Commander setup, but I’m unsure.

What might this sound like to you guys?

Looking at your file, I’d say check the printer name and slashes.

\SERVER should probably be \SERVER

Printer name I always do in UNC format, like \SERVER\PrinterShareName. I always configure printer with share name that doesn’t have any spaces if I know it’s going to be used for BT.

you can also look in the bartender logs it should tell you why there was an error… i dont know if this is a set up but with ours the .bt files get change to .btp once the file gets sent to the printer queue, the .btw extenstion is the label itself… that could be the issue. also the path should read \Server\VOLUME$\EpicorData\Bartender\OUTPUT

@markdamen

You were certainly right about the UNC path format when referencing the printer. Things started going awry for me on this front when I moved the BarTender install from my local workstation up to the ERP server. When I tested at the local workstation, the referenced printer name was exactly what you saw listed earlier in this thread (“DYMO LabelWriter 450 Turbo”). After moving everything up to the ERP server, it never registered with me that the BarTender commander would now be looking for that exact same printer name in its own localized list of printers.

In BarTender’s cozy, new server habitat, it had no way of knowing that I wanted the print jobs to be sent directly back to the requesting workstation where the Epicor client was running (“how dare it”).

A bit slow to understand that - but I got that figured out. So, thanks for helping me shake up the noggin on that one.

The C# code to figure out which workstation (read: print server) and which printer instance is the correct Dymo label printer (and to isolate its share name) was a bit of a challenge… but I persevered and actually got that to work, as well.

Thanks very much to everyone else in the thread (@Banderson, @suteraj20) for all of your advice.

so what I’m seeing here is more or less only usable for those running Epicor On Prem right?

it’d be awesome if there was a module in Epicor that could connect to the cloud server and be the conduit to grab files + dump to a local bartender server and send the jobs where required (rather than having to use local print queues)

I guess this would be Service connect yeah?

Bartender will work for both On-Prem and SaaS.

You need to log a case with Epicor to establish an FTP connection first. Here is the KB: KB0045416.

The bartender Integration service does all the polling for files and printing. Epicor just generates the text file that contains the data, and puts it into the output location determined by the value of the Output field in the report style. That’s if you are using the standard bartender labels.

You should be able to use the FTP method when you create an integration to access the generated .bt files.

There is also another KB: KB0089227 which mentions about using NetDrive or WebDrive to present a proper path to the integration, if you went down that route you would then use the Computer/Network Location option in the File detection section of your integration.

I don’t think getting Service Connect involved is required. You have the canned reports with autoprint as well as various examples here on generating a custom file, although your mileage might vary on SaaS doing the latter. Hard for me to comment too much on SaaS as I’ve always been On-Prem.

You also need to have your printers configured in Epicor as well. The printer UNC is included in the /PRN parameter of the bt file. Without it the labels won’t print.

I hope the information helps.