Preview and Print Report on Rolls Paper (XP-80) (2 Viewers)

Bounthong

New member
Local time
Today, 16:30
Joined
Feb 28, 2023
Messages
4
Dear Expert,
My name is Bounthong from Laos, I am new in this forum, I use MS Office 365, I have a pretty good command in VBA, but may be not very advanced. I am very excited to join.

I am stuck with a report which is the bill of a restaurant to be printed in a printer with rolls paper (XP-80):
- the report header height is fixed, contains bill no, table, date .... information,
- the report footer height is also fixed, contains the price sum, discount, paid amount ... information.
- the detail section which is a subreport showing the food ordered, amount, unit price and price of each food (menu), the height for this section can grow and shrink with the number of record (number of food (menu) ordered.

Now I face 2 problems:
Problem 1. when I design a report with fixed paper size, I see very often too much blank space in the detail section above report footer, especially when the number of ordered menu/food is small.
Question 1: How I can set the height of paper depending on the number of record in detail section?
Question 2: Can I also send from MS Access information through VBA to my printer to set to my customized paper size (which will be changed for each bill)?
Problem 2: Now the problem is bigger, when I open report in preview mode and make paper setup to XP-80 which is installed with rolls paper. The report details report becomes very very long blank space, and when I print it seems that the blank details section is endless, I have to pull out the cable of printer and cancel print queue.
Question 3: how I can limit or set the paper size from vba for rolls paper or rolls paper printer?

Anyone, please help.
Thanks in advance.
 

June7

AWF VIP
Local time
Today, 01:30
Joined
Mar 9, 2014
Messages
5,472
I've never seen any code that deals with printing to roll paper.

Question1: I have seen this asked before and IIRC, not a simple solution. Why worry about blank space? That's the way footers work. You see this in books all the time. Paper size is same and less print means more white space. Of course, if goal is to save on paper cost, would be nice to change page length. Determine how many records per inch, determine how many records in your report, calculate page length.

Question2: Some printer settings can be manipulated with VBA. I have done this to change print tray or destination printer. In your case might have to open report to design view and change report settings then save and print. That could be done programmatically. I have one case where I do just that, but unrelated to printer settings.

Question3: Whether or not your printer properties can be manipulated is unknown to me. I had some code that worked fine until we replaced printer. Could no longer address same properties. Code is dead. However, I don't think the solution is to change printer settings but to change report Page Setup which is dependent on solution for Question1.
 
Last edited:

SHANEMAC51

Active member
Local time
Today, 12:30
Joined
Jan 28, 2022
Messages
310
I am stuck with a report which is the bill of a restaurant to be printed in a printer with rolls paper (XP-80):
perhaps I would have gone this way
- grouping of the report by account number
- the height of the group header is fixed, contains the account number, table, date.... information,
- the height of the group note is also fixed, contains the amount of the price, discount, paid amount... information.
- install a non - standard sheet , for example
(width of your paper) *(height 10 cm)
(without margins)
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 17:30
Joined
May 7, 2009
Messages
19,243
to make your subreport small, just make the sub-report very small in design view.

Screenshot_2.png
 

Users who are viewing this thread

Top Bottom