Hello friends
I am Sarfaraz. How are you all.
Friends few months back I developed a project (
OPD Reg. in VB6 and access 2007) for a Hospital. It was just going good till they print the
OPD tickets using
Laser Jet Printer but now they want them to print on a
DotMatrix Printer(Epson LX-300+II) using the printed tickets. When they print the OPD ticket the first ticket is being printed fine but when the 2nd ticket is being printed the
printer is not being reversed so that the printing is being done at an appropriate place.
Now I am facing this problem, please help me in that. My code for the print button of the ticket is as under:
Printer.CurrentX = 3000
Printer.CurrentY = 360
Printer.FontSize = Label10.FontSize
Printer.FontName = Label10.FontName
Printer.Print Label10.Caption
Printer.CurrentX = 3600
Printer.CurrentY = 800
Printer.FontSize = Label14.FontSize
Printer.Print Label14.Caption
Printer.CurrentX = 500
Printer.CurrentY = 900
Printer.Print "____________________________________________________________________________"
Printer.FontBold = True
Printer.FontName = "times new roman"
Printer.FontItalic = True
Printer.FontSize = Label16.FontSize
Printer.CurrentX = 500
Printer.CurrentY = 800
Printer.Print "Rs. 5/-"
Printer.FontBold = False
Printer.FontItalic = False
Printer.CurrentX = 7300
Printer.CurrentY = 800
Printer.Print "Time: " & Label12.Caption
Printer.CurrentX = 500
Printer.CurrentY = 1300
Printer.FontSize = Text1.FontSize
Printer.Print Label1.Caption & " " & Text1.Text
Printer.CurrentX = 7300
Printer.CurrentY = 1300
Printer.Print "Date :" & Label11.Caption
Printer.CurrentX = 500
Printer.CurrentY = 1700
Printer.Print "Name :" & Text2.Text
Printer.CurrentX = 7300
Printer.CurrentY = 1700
Printer.Print "Address :" & Text3.Text
Printer.CurrentX = 500
Printer.CurrentY = 2100
Printer.Print "Age :" & Text4.Text
Printer.CurrentX = 7300
Printer.CurrentY = 2100
Printer.Print "Sex :" & Combo1.Text
Printer.CurrentX = 500
Printer.CurrentY = 2500
Printer.Print "Section :" & Combo2.Text
Printer.CurrentX = 7300
Printer.CurrentY = 2500
Printer.FontBold = True
Printer.Print "Room No : " & Text7.Text
Printer.FontBold = False
Printer.CurrentX = 500
Printer.CurrentY = 2600
Printer.Print "____________________________________________________________________________"
Printer.CurrentX = 500
Printer.CurrentY = 3000
Printer.Print "R/x"
Printer.FontBold = False
Printer.CurrentX = 500
Printer.CurrentY = 12100
Printer.Print "____________________________________________________________________________"
Printer.CurrentX = 1800
Printer.CurrentY = 12400
Printer.Print " This is your own Hospital,Please Keep it clean."
Printer.EndDoc
I got some clues about the problem. First is like i need to use
crystal reports while printing the form text. Second is that I need to
save the data in a text file and then print it from that text file.
I do not know how to implement that please help.
Thank you