Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report printing problem

Status
Not open for further replies.

IvySoe

Programmer
Apr 9, 2015
24
SG
I have problem in invoice printing with dot matrix printer (EPSON LQ 2170).
when print more than 1 pages report, the first page is fine,then the printer skip the second page and print page 2 on 3rd page with the alignment is move up. and 3rd page skip again and 4th page also the alignment is moving up and ended up the title header is printed on previous page bottom.

The report is created with visual foxpro 7 report designer. The default settings are removed from report table.frx by removing memo data from expr,tag,tag2 columns.
It is happen after the software is moved from server to local pc, which share by another user. printer was the same setting as before.
and it only happen for the first time printing after the printer power is on. printing alignment is fine from second time on wards. every time printer is power off and on again, the first print out is out of alignment. and i tested with different version of report with different setting and the problem still happen.
It happen on both user's pc. the printer is install on user pc1 and user pc2 share user pc1 printer.
I tried uninstall/reinstall printer (local/share) on user pc2 and problem still exist.
Can anyone help?
 
Just looks like the printer already is on page 2 when the FF feeds a whole page. Where a FF ends is up to the printer only and detected by paper perforation ( I assume it's an endless paper feed?). It's hard to tell what's going on exactly without hands on hardware, but I'd start with several tests on several initial paper positions. Foxpro prints best on gdi+ printers, as that's what the VFP print engine feeds. Maybe your printer hardware just has a problem with perforation detection, which resolves when the printer got worm, that couls really be a physical problem. All systems have a tendency to not work at the beginning (when things are misconfigured or not yet understood) and at the end of their lifetime, this is especially true for hardware.

Bye, Olaf.

PS: The first solution coming to my mind from what you say is, to not turn the printer off. It coud contribute to shortening the rest of the lifetime of the printer, but I often hear the argument for hard drives, that each power off and on costs lieftime of the machanics more than leaving a hdd on. It's not true, but it would obviously help in your case with the printer.
 
It sounds to me like the page length setting is wrong, that is, that the report thinks the page is longer than it really is.

I suggest you first check the paper size, as specified in the Page Setup dialogue. Then check the paper length settings in the printer. In the case of Epson LQ printers, that setting is defined either by dip switches or an ESC sequence. If you are using the LQ printer driver, the correct ESC sequence should be sent automatically, but if the dip switch settings are wrong, you will have to adjust them manually.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Mike has a point, the page size configured in a frx is not in the expr,tag,tag2 columns, that just removes printer model specific settings you might not want in a report, that should print on any printer. Indeed, if that report should always print on the needle printer, keeping these infos might also be a solution, these columns are not bad in themselves in any case, especially if the development is done on the computer with that printer thes columns contain the valid and correct values to print via that printer.

What Mikes assumption does not take into account is, that the report prints fine from the 2nd print onwards. A wrong page size in the frx would mean every output woud be wrong. It's nevertheless worth looking at.

Bye, Olaf.
 
As well as a page length setting, many dot-matrix printers have a setting named "skip over perforation". This is designed to provide a small gap at the bottom of the page and the top of the next page, to ensure that nothing is actually printed on the perforation. If this setting is set differently to what you are expecting, that could perhaps explain the behaviour you are seeing (although it wouldn't explain why it only fails on the first report after power-on).

It would be worth your checking this item. It is probably a hardware setting, that is, set through dip switches (or maybe some other physical switches on the printer). Refer to the printer's manual if you are not sure how to do that.

By the way, I'm assuming you are printing on continuous stationery, that is, using the tractor-feed rather than single sheets. Perhaps you could confirm that.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Mike,
I removed all default page and printer setting of report.frx from expr,tag,tag2 columns.
And if paper length setting causes error, the alignment will be out always, isn't it?
now, the problem happen for the first time print after power on the printer.
 
IvySoe,

I accept your point that it only happens on the first print after a power-up. That would argue against what I said about paper size.

But, for your information, clearing Expr, Tag and Tag2 is not something that is likely to be helpful in this case. As Olaf pointed out, that only clears any printer-specific information that has become embedded in the report. The page length setting is goverened by the printer's properties within Windows (as well as any physical settings). I suggest you try not clearing those fields, and see what effect it has.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Exactly, to clear these fields only is a good rule of thumb, as there can be settings embedded about specific printer language usage and other things only working on the printer you developd with. But IF you develop your report with the printer you print on, it's actually the better idea to keep these column values.

As Mike said, some things are goverened by the OS, others by the printer driver (especially when you clear out the columns in the frx) and things like the page size are general properties of the report. So you don't clear out paper size, you have to set the report to the used sheet size, which can have unusual lengths with perforated endless paper.

Bye, Olaf.
 
It sounds like your printer is set to some defaults and after the first time around, the reset code is sent to the printer at the end of the report and there on wards prints fine.

In he network environment, you may have never/rarely power cycle the printer.

1. Try saving thi printer in the report
2. Try sending reset code first, such as esc sequence before printing.
3. Try a) power cycle the printer, b) Form Feed on the printer few time and observe if the Top of Form is still aligned as required.

nasib
 
Hi Olaf and Nasib,

I also tried to set printer , paper size using that printer in the report. but came out the same result. it seems whatever the setting of the report(no default setting, or with default page and printer setting), the same error result came out (the first page is ok, second page move up a bit, third page header ends up printing on second page bottom).
( the first set of print can be ... 1 page invoice , 2 pages invoices, 3 pages invoices or more than 1 invoices with different page numbers. )

Nasib
Can you please clarify a bit about 'power cycle the printer' and 'form feeb on printer to observe'?
 
Try

1. turn off the printer
2. align the paper to the TOF (Top of the Form). If you send data to the printer, it will start printing at where the print head is.
3. Now hit the Form Feed button on the printer. Some times it is marked FF. Verify with if TOF is at the same place as it was on the first page. I mean the print head is at the same place as it was on the first page. Try few times and see if it at the same place.

Another way to find out if the problem is with the printer or foxpro reporting: try creating a word document and type 'page 1' on first page first line, 'page 2' on the second page first line and 'page 3' on the third page first line. Leave balance of each page blank. Try printing this document. I hope this may give you some clues.

 
1. Turn off the printer -> Turn off the printer, wait few seconds and Turn it on.
 
IvySoe, that simply looks as if your printer settings (and report paper size settings) are at a paper length longer than the physical paper, you have to adjust that setting. Otherwise of course the form feed is too long and each page shifts down further.

I don't know your printer model and features, some old endless paper printers had a perforation detection, so a FF sent to the printer would always align the print head to halt short after the perforation. That might not be the case here. Or that detection only works, after the printer has warmed up. My overall assumption already was the printer may be at the end of its functioning lifetime, you can't blame anyone for that, if such page perforation detection stops working, if it exists at all.

By the way you haven't yet confirmed such assumptions about the prniter and whether it has dips. Do you have a manual of the printer at all? Did you search for it? Such things are not solvable in a one solution fits all manner, especially with old printers. It's much easier to position correctly on paper if the feed is a single sheet feed anyway, then such shifts of pages can't happen.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top