allicia
asked on
printing control
hi,
i would like to print bills using dot matrix printer (epson 1121) and the paper used is 8x6. the bill should look like this:
- Company Name and Address -
Bill No: 00010 Date: 08/07/2002
Customer Name: Sam
Credit Card No: -
Item Item Quantity Unit Price Ref
Code Description Price
-------------------------- ---------- ---------- ---------- -
0001 Beer 10 5.00 50.00 -
0003 Pineapple Juice 2 8.50 17.00 -
-------------------------- ---------- ---------- ---------- -
Total Order 67.00
Room Charges 80.00
Discount (47.00)
Service Charge (@10%) 10.00
Govt. Tax (@5%) 5.00
-------------------------- ------
GRAND TOTAL 115.00
-------------------------- ------
to print the bill in this layout, i use Printer.Print strPrint where strPrint is the variable that carries the above bill values.
the printing can be performed just like the layout. but i have a problem here, after finished printing, the printer will load the paper out as if it is A4 size paper and it is not suppose to be like that. what is wrong with it? is it because of the code, or the setting in the printer?
i would like to print bills using dot matrix printer (epson 1121) and the paper used is 8x6. the bill should look like this:
- Company Name and Address -
Bill No: 00010 Date: 08/07/2002
Customer Name: Sam
Credit Card No: -
Item Item Quantity Unit Price Ref
Code Description Price
--------------------------
0001 Beer 10 5.00 50.00 -
0003 Pineapple Juice 2 8.50 17.00 -
--------------------------
Total Order 67.00
Room Charges 80.00
Discount (47.00)
Service Charge (@10%) 10.00
Govt. Tax (@5%) 5.00
--------------------------
GRAND TOTAL 115.00
--------------------------
to print the bill in this layout, i use Printer.Print strPrint where strPrint is the variable that carries the above bill values.
the printing can be performed just like the layout. but i have a problem here, after finished printing, the printer will load the paper out as if it is A4 size paper and it is not suppose to be like that. what is wrong with it? is it because of the code, or the setting in the printer?
Is your Data data-based? Why not just create the reports to print out the bills? You can try use the built-in Data Report in VB6 to generate a report.
regards
regards
ASKER
how to use the built-in data report?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
PNJ is correct.
Most dot matrix printers have DIP switches that allow you to specify the page height.
You would need to change the DIP switch to reflect the paper size you require.
When you issue a Printer.EndDoc or Printer.NewPage, the printer driver physically sends a Form-Feed sequence to the printer. The printer will then move the paper however far it needs to until it reaches the top of the next page as defined by the DIP switches.
Some printers allow software control of these settings.
HTH,
Alon
Most dot matrix printers have DIP switches that allow you to specify the page height.
You would need to change the DIP switch to reflect the paper size you require.
When you issue a Printer.EndDoc or Printer.NewPage, the printer driver physically sends a Form-Feed sequence to the printer. The printer will then move the paper however far it needs to until it reaches the top of the next page as defined by the DIP switches.
Some printers allow software control of these settings.
HTH,
Alon
In your printer just putt of the setting of Auto Tear off then it will not act like this. If Auto tear off is set on then it forwards the paper few inch after printing is complete if you dont wann that then change that setting.
> how to use the built-in data report?
You need to create the Data Environment first, then try add the Data Report. You may try search the key word like: Data Environment or Data Report in MSDN to see the futher helps.
regards
You need to create the Data Environment first, then try add the Data Report. You may try search the key word like: Data Environment or Data Report in MSDN to see the futher helps.
regards
ASKER
yeah, you are right.
it's the driver's problem. after changing the paper type to user-defined, it works just fine.
thanks!
it's the driver's problem. after changing the paper type to user-defined, it works just fine.
thanks!
'User defined paper size
printer.papersize = vbPRPSUser
'Height and Width is measured in twips
'1 inch = 1440 twips
printer.height = 11520
printer.width = 8640
hope that this will help
regards,
X14h