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 doesn't print in color

Status
Not open for further replies.

Rajesh Karunakaran

Programmer
Sep 29, 2016
549
MU
Dear Team,

I have a report which I need to print in color. I have made the color specification in the properties wherever I want. When I preview the report I can see the colors. However, when I print it, it doesn't print in color.

1. 'Printer Environment' is NOT SAVED in Report form.
2. I checked the FRX table in its first record (Objtype 1 Objcode 53)
- I have below code in Expr field
ORIENTATION=1
PAPERSIZE=9
COLOR=1
- Nothing is there in Tag & Tag2 fields.
- Against the color element I can see Penred 0, Pengreen 0, Penblue 255
3. I am printing on my HP printer (or rather I want the print in that printer)
4. My default printer is not the HP one
5. Before I call 'REPORT FORM', I set the printer using 'SET PRINTER TO'
6. In my system, the said printer is configured for color. I verified in all possible ways.

Is this a know problem and there is a work-around?

Thanks in advance.
Rajesh
 
Well, look into your printer settings. I doubt COLOR=1 in a frx will make the report engine use the printer driver to set the printer to color mode, if your printer setting is black&white only, that'll most probably get priority.

Bye, Olaf.
 
Dear Olaf,
That was rocket fast! Great!

However, I want the print in COLOR and my Printer is set default for color.
But, my report prints in B&W. That's my problem!

Rajesh
 
Try without anything in the EXPR field.
When printing with preview, is the preview in color?
Do images show in color?

Bye, Olaf.
 
Rajesh, can you clarify. You say:

I am printing on my HP printer (or rather I want the print in that printer)

(emphasis added).

Are you sayuing that you have set the printer to the HP, but the output is not going to that printer?

How are you telling the report which printer to go to? Have you got a PROMPT clause in your REPORT FORM command? If you haven't, then the output will go to the default Windows printer (because of the SET PRINTER TO command).

If the output is going to the correct printer, have you got that printer set up to print in colour. In the case of an HP printer, you do that by going to the printer properties, then click on Printing Preferences, then select "Color" in the Paper/Quality tab.

Also, can you print in colour to that printer from another application, such as Microsoft Word?

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
If you are using new features of VFP to print texts in colors, you have to SET REPORTBEHAVIOR 90 to get the features, and you have to have the new reportoutput.app or your executable reverts to the legacy report engine still in the runtime DLL as fallback option.

Bye, Olaf.
 
Dear Team,

Sincere apologies for this delayed report. In fact, the alert emails for replies posted to tek-tips were going to Spam folder somehow. I just now realised that.

I see that I have not given full details wherever I wrote the commands I used and made the things a bit confuse. Sorry for taking up your valuable time.

Let me describe the scenario once again.

- I want the print in my HP printer.
- My default printer is not the above HP printer.
- The HP printer is set for color printing in its defaults/preferences (I believe I have changed at all required parameters)

- My report form has some table field elements which are set in color (company name, customer name etc)
I just changed the color in the field's property setting.
- My report form doesn't have the printer environment saved in that.

- When I print this report,
- I set the printer using SET PRINTER TO NAME <printername>
- Issue the print command 'REPORT FORM <report filename> TO PRINT NOCONSOLE
- set the printer back to its default using 'SET PRINTER TO NAME (ALLTRIM(SET("Printer",2)))'

* But, the print is not in color.
* If I issue 'REPORT FORM <report filename> PREVIEW NOCONSOLE', I see the preview with colors in report.

I see there is a point in Olaf's suggestion for REPORTBEHAVIOR. I will try that.
Too, If that doesn't work, I think there may be some other setup in the printer I miss. Let me check everything once again.
I will come back with my findings for sure.

Thank you very much for your time,
Rajesh
 
Thanks for the detailed information.

I think there may be some other setup in the printer I miss. Let me check everything once again.

The best way to check that is try printing in colour from a different application, such as Microsoft Word. If that works, you know it is a VFP problem. If it doesn't work, there is something wrong with the printer settings.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top