In my program, I need to have invoices printed from the program for the client's sales. The invoices are printed on pre-printed stationery whose top has the client's name, address, etc printed. The invoices are printed on a fan fold type paper on a dot-matrix printer (TVSE MSP 240 Classic).

The invoices are being generated via Data report. There is enough top margin for the top of the pre-printed stationery. The first invoice that is being printed is coming out perfectly. When the print command is issued the printer head is moving down leaving the top margin and printing in the area where it is supposed to.

The problem is coming from the printing of the second and subsequent invoices. The printer header is not moving down to allow for the top margin and is starting printing on the pre-printed portion. To prevent this, after every printing the user has to switch off the printer and reset the paper. Obviously this is not a practical solution.

I have tried almost everything I could think of, but all the same, the printer refuses to allow for the top margin from the second invoice onwards and merrily goes on printing from the top of paper.

Does anyone have any solution to this problem ?


Recommended Answers

All 4 Replies

Show me the code you are using for the printing. It seems that you need to refresh before the next page prints....

I am not using any specific code for printing. The print is being done from the print option in data report - the standard print dialog box etc.

I think the problem then lies with the continuity of the data report. It seems that there is no "line break" in the report, once it starts, it will run right down to the last record printed. You need to set some code to load the report at page intervals etc.

I will play a bit to see what I can come up with. In the mean while, search the problem on the net. There might be a solution out there.:)

There is just one page in the report. Each page is printing one invoice.

Situation is like - The user generates an invoice and prints it. It almost always fits in 1 page. The invoice prints perfectly, no problems. 10 minutes later, another invoice is generated, it is printed - and the print starts from the top of the page, over the pre-printed area.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.