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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

foxpro 2

Status
Not open for further replies.

Alexb0725

MIS
Jun 9, 2021
6
PH
Good day!!!
I've using visual foxpro for many years but using its environment only and right now I'm starting to program. So right now I've encountered a problem on printing a report. I've created a report using my two tables and when I press the printer icon it's send to the printer queue but nothing happened and for about 2-3minutes it will give an error. I've type the command "report form sample.frx to printer". Can somebody please help me? When I print using other software, it prints perfectly. I'm using EPSON FX-2175 printer.
Thank you very much and more power.
 
Without the error message it's hard to help.

All I can say is that your command to print a report is basic, but can work. No report is just the frx (and frt) file aone, though, It'll either know the DBFs it needs and wants to print from or it'll depend on you preparing data in the so called current workarea, in short an opened table (USE some.dbf) or a SQL query result.

And as so many things in computers, it will depend on how the report is defined.
When this worked before, it's likely your report knows which tables it wants, but data is never included in the frx file (then it wouldn't be a report but a document, wouldnt it?) so when a report stops working, then it's usually either a DBF defect or DBF, maybe some data is not as necessary, or DBF files are completely missing, if it's not even a beginner error like only copying the frx (without the frt).

Chriss
 
Good day!!!
Thanks for your quick response on my inquiry sir Chris. Actually I've use the report wizard and when I preview it, all the data was displayed on screen but when I clicked the printer icon, it won't send to printer and the status on printer queue was "Error-Printing". I'm using foxpro 9 and is there any setup do I need to do in my foxpro 9 settings? I really need a help on this matter. Hoping you can help me.
Thank you very much and stay safe
 
When VFP can add a printjob into the printer queue, the problem isn't in the VFP report.

Look for problems in the printer driver version and spooler configuration, ie in Windows.

Even when other applications print fine, they might use 64bit drivers, while VFP is 32bit. They might use other drivers, another Windows printer (a printer can be installed multiple times for different ports (USB, serial, Network).

The problem could be as simple as a problem in the printer itself, mechanical - paper jam, low ink or toner...whatever. But VFP does create a print job and the rest is up to Windows printing system.

If it was legacy code printing more directly by printer-specific commands and escape codes, then an error would occur in VFPs process and be reported with a VFP error number/message. None of which have "printing" in them, as can be seen here:
One more thing to know about VFP printing is, by default VFP will print to the Windows default printer, unless the report has embedded printer info. So take a close look at the title caption of the print job queue and see whether the printer name is actually what you expect it to be. One reason this might fail is a relatively new setting VFP doesn't cope with: The "Let Windows manage my default printer." setting in Settings > Devices > Printers & scanners. Uncheck that, if it's checked. As it states, Windows then will automatically make the last used printer - used by any application - the default, which could also be a receipt printer or any network printer.

Chriss
 
Good day!!!
Thanks a lot sir Chris and my problem was solved and you're right that is not the VFP and it's my printer driver. I'm just wondering why I can print on DOS prompt using my DOS app and when I print using word or any other apps it won't print but I've successfully installed my printer.
Again thanks a lot and more power.
 
DOS printing usually means using a certain port.

Windows will not know your printer before you install a driver, that's how printers make themselves available to any Windows application.

Chriss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top