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

Another - Printing a report after preview

Status
Not open for further replies.

IForgot

Programmer
Mar 20, 2002
122
0
0
US
My users want me to change the Backcolor on a Grid's Row when a record is printed.

Consequently I give them a intermediary selection form prior to Printing with the following choices:
* Print
* Preview
* Cancel
And, based on their choice, I execute the appropriate
REPORT FORM MyReport NEXT 1.... code.

If they actually Print the Report, I can "see" their selection, Print the Report and make the appropriate changes to the Grid's DynamicBackColor. It works well.

And if they Preview the Report there is no assumption nor expectation that they will Print.

But if they do indeed Preview the Report first and then, from within the Preview, they choose to print directly out of there, I don't "see" the print having occured and therefore cannot change the Grid's DynamicBackColor.

Is there a way for me to do either of the following:
1. Identify the Print via Preview has occured?
or as a 2nd, less preferable choice
2. Eliminate the Print via Preview toolbar which is displayed during the Report Preview?

Thanks,
I_Forgot
 
Check out this faq by Mike Gagnon. I have used it and it works well.

How to determine if the user pressed the print button during preview faq184-2919

Jim Osieczonek
Delta Business Group, LLC
 
From FAQ184-2919

"And in the gray band of page header of your report (The first of three bands), in the "on entry" textbox put PRINTED()"

What "On Entry" Textbox ??

My VFP7 Report Forms do not have access to any TextBoxes within the Gray Bands.

Yes, I can add a new Field TextBox within the Header Band (white area between gray bands) and I can enter a call to a Function within its expression, but, as described, it is not clear.

Is this the correct approach?

Thanks,
I_Forgot
 
I_Forgot,
Just double-click on the "grey bar", and a new window will appear where you can enter the Printed() call.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top