vbTab Problem

Joined
Jan 15, 2009
Messages
21
Programming Experience
5-10
I am running a Point of Sale program that writes the ticket information to a text file and then prints the file.

The problem I am running into on the one of the computers I am dealing with is that it prints the vbTab I am sending as one space. The computer is running Windows 2000 SP4 and has the .NET framework up to 2.0.

I have tried everything I can think of and nothing seems to work. I would really appreciate any help I can get. I know it is probably something simple I am overlooking. Thanks
 
Tabs are used to create "columns" in plain text, which means they have a max number of spaces but when the text to the left of the tab expands the spaces inside the tab decrease, this is to keep the text to the right starting in the same character position.

If you're still with me in this post, how about you post the code that you've got now and we'll go from there, there's more than 1 way to align text than just using tabs
 
Thanks for your response. I have it formatted exactly how I want it to print out, and it prints fine on the 5 other registers. Here is one of the lines it is screwing up.

receiptstr += vbTab & vbTab & "Cash " & Format(cash, "0.00") & vbcrlf

Then I save it to a file with this line.
My.Computer.FileSystem.WriteAllText(path, receiptstr, False, System.Text.Encoding.ASCII)
Then I run a batch file to print it.

With the cash line I have above it should print full tabs because there is no space taken in front of it. Instead it prints out - Space Space Cash 10.00
If I open up the file, it displays the proper tabbing. The problems is just when it prints out.
 
Perhaps the printer on that one register isn't configured like the others are.

It sounds like your program is working fine, so the problem isn't with your program, which means I don't know how to help you here.
 
Back
Top