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!

show in 'print preview' but not print ?? 1

Status
Not open for further replies.

Judi201

Technical User
Jul 2, 2005
315
US
Hi!

I am using the little trick of running the report twice to print page # of total # on my reports. For this report, I don't want to print this on the page but I would like very much to show it in preview. Is there any way I can show it in preview but not print it. It seems that I read somewhere about doing something like that, but I can't find a reference on line or in the worderful books I have. Did I dream it?? I sometimes do that.[smile]

Thanks for any ideas.

Judi
 
Hi Judi,

The trick is apply a Print When condition to the page # of # field. The condition itself will be something like this:

Code:
NOT WEXIST("Printing...")

Theh "Printing..." window appears on the screen during printing, but not during previewing. So, the above condition will tell the report whether it is currently printing or previewing.

By the way, which version of VFP are you using? I assume you know that in 8.0 and above you don't have to resort to this trickery anymore, as page # of # is built in.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Hi Mike!

Thanks for the response. That is what I had read somewhere but couldn't get the "Printing..." part. I am still on VFP6.0. Hoping to upgrade equipment and VFP to 9 when I finish this project. You may remember that I just got back at this after many years. Having to move slowly.[smile]

As always, your response is right on target!

I'll see if I can make it work now.

Many, many thanks.

Judi
 
Mike,

Works like a charm. Thanks again.

Judi
 
Mike,
You are probably right. I live with that book and 'Taming VFP's SQL' on my right hand. Actually, I have come a long way since your first very encouraging posts help me get started in this OOP world. Slow, but I'm getting there.

Maybe the star is for being here and understanding my questions. (and knowing the answers ;)

Judi
 
You could use (SYS(2040) == 1) In PrintWhen. I prefer this, because if you use somehwere REPORT FORM ... NODIALOG, WEXIST() couldn't work.

Borislav Borissov
 

Borislav, it appears that SYS(2040) was introduced in VFP8, and Judi uses VFP6. As Mike Lewis noted, "in 8.0 and above you don't have to resort to this trickery anymore, as page # of # is built in".
 
Hi Borislav and Stella,

Thanks for your comments. Before long I am going to upgrade to 9 and do all of these nice things you talk about, but until then I appreciate all of your help getting there. Can't imagine what I would do without you! Actually, yes I can for nothing like this was available when I did this before. Before Visual anything!!!

Judi
 
Oops, Sorry.
Stella, I read the first message and Mike's ones and decide to give my oppinion. Just I slept through version of VFP Judi used :)

Borislav Borissov
 

Judi,

Actually, yes I can for nothing like this was available when I did this before. Before Visual anything!!!

Yes, I know, I also did some FoxBase, some dBaseIIIPlus, lots of Clipper Summer'87, etc. Wouldn't want to go back now, though.
I also still use VFP6, that's why I suspected sosmething is not right with SYS(2040); looked it up in my Help - nope, not there; then I searched MSDN site.
 
Stella,

Glad to know some of you are still in my world. I am going to need you to get through with this.[smile]

Judi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top