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

Printing problem

Status
Not open for further replies.

Mrall

Programmer
Nov 22, 2008
64
US
The program printed fine to start with but for some reason it won't print now.

REPORT FORM standard FOR TRIM(finalstatus) = "Pending" preview

The preview shows up with the report looking just fine. But, when you click the print icon, it dings and nothing prints. Nothing show up in the printer que.

I have a choose printer setup routine to make sure that the report is going to the correct printer.

SET PRINTER TO NAME GETPRINTER()

If I (set printer on), It prints a blank page on the correct printer. Also, the printer is my default printer and prints just fine in word or excel or any other program.

I'm sure it is something simple.
Thanks

Marty
 
You say "The program printed fine to start with but for some reason it won't print now."

So, the obvious question is: What's changed? Something must have changed, either in your program or the environment, to cause the problem. If you can figure out what it is, you will be part way to solving it.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
The only thing I can think of is, when I create the orignal reports, I had a different printer. (same computer) I don't know if it matters what printer the report was created with. At least I hope it doesn't matter, because if I distribute this program it needs to work with whatever printer it is hooked up to.

I don't think any enviromental setting have changed.

Thanks
 
I can see the printer causing this, depending on the version you're using. If VFP stores printer-specific data in the report itself, it will expect to find that same printer at runtime.

If you're using VFP 8 or 9, look on the report menu and uncheck the "Printer environment" item. Earlier versions are slightly more complex, but not difficult.
 
I made the changes in the reports and unchecked printer environment and saved the report. I'm Using VFP 9. It apears that the preview bar is locked it won't page through the report or print it just dings if you click on anything in the preview bar the x won't close the report. I have to click on the x on the report window to close the report.
 
There are two completely different report engines in VFP9. Which one are you using? It really does make a difference.

What you're describing is behavior I'd expect from standard VFP controls when the underlying alias is at EOF().
 
Marty,

Is it possible that your FOR clause is not returning any records? In other words, is TRIM(finalstatus) = "Pending" true for at least one record? Try running it without the FOR clause to see if that changes anything.

Also, as Dan suggests, trying running with REPORTBEHAVIOR set to 90 and 80 respectively.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
The FOR clause is fine and the report runs fine when I specify TO PRINT instead of Preview. It is just in the preview where the problem is. I have removed the preview and it works just fine. I would like to still be able to preview the report before printing.

Any ideas?
 
The FOR clause is working fine and when if specify TO PRINT the report prints fine it is just the preview that is messed up.

Any ideas?
 
I ask again: which report writer are you using? There are two of them, and they couldn't be any more different.
 
I use the default report writer from the project manager. I click documents, reports and modify or create.

I really haven't messed with any other report writer.

Thanks
 
I use the default report writer from the project manager. I click documents, reports and modify or create.

But what is the setting of REPORTBEHAVIOR? What do you see if you type this command in the command window:

? SET("ReportBehavior")

I think that's what Dan had in mind when he referred to the two different report engines.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Thanks. That takes subclassing the controls off the table.

Hmmm.... all I can suggest at this point is deleting the Foxuser record(s) for that report and try again.
 
These are the settings in my main.prg

SET REPORTBEHAVIOR 90 && Using the new reporting engine features
_REPORTOUTPUT = "ReportOutput.app" && Designate application to use for report output
_REPORTPREVIEW = "ReportPreview.app" && Designate application to use for report previewing
 
Based on those settings, there seems to be no point in using REPORTBEHAVIOR 90 - unless there is some other reason that we don't know about.

It would be worth doing SET REPORTBEHAVIOR 80 to see if that cures the problem.

One other thing worth trying would be to use a different printer driver. The generic/text only driver would be a good choice, but if you have another printer physically installed, try using that.

In fact, in any case where the preview works but the printout doesn't, the printer driver should be high on your list of suspects.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Mrall said:
These are the settings in my main.prg

SET REPORTBEHAVIOR 90 && Using the new reporting engine features

Disregard my previous post. It was based on your statement that you were using default settings. You are not.

WE ASK THESE QUESTIONS FOR A REASON!

I'm afraid to ask whether you've installed any of the VFP service packs or hotfixes, most of which affect the report writer. ;-)

(I've long since lost the bug lists. Anyone know if this is on there?)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top