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!

Is it possible to disable printing while Preview VFP report? 1

Status
Not open for further replies.

freddiekg

Programmer
Oct 13, 2009
25
0
0
MY
Dear all,

I like to control the printing of the hardcopy reports. All users are allow to preview the reports but only certain users that have higher security access can actually preview and print the reports.

Is this possible?

Thanks in advance.
Freddie
 
Alternative solution by Colin Nicholls:

------------------
You should know that if REPORTBEHAVIOR 90, the preview window will ignore VFP8-style toolbar preferences.

However, you can hide the print button on the toolbar by manipulating it directly. See my article Exploring and Extending Report Previewing in VFP9, particularly the section half-way down where it talks about the presetting the preview and the .AllowPrintFromPreview property.
 
In case you're a member of UniversalThread.com, you can also review <B>Re: How to get rid of the printer icon in the preview toolbar</B> Thread #1044214 Message #1044301
 
Also solution by Christof Wollenhaupt:
-------------------------------------
In VFP 8 and previous versions, the simplest approach is to remove the printer icon from the preview toolbar. Make a copy of your FOXUSER file. Start VFP and ZAP the current FOXUSER file. Bring up the print preview toolbar, hold down the ALT key and drag the print from the toolbar. Quit VFP. In your application you now need to distribute the newly created foxuser.dbf file and activate it right with SET RESOURCE TO just before you display the printer preview. VFP then loads the toolbar definition from your modified foxuser file.

In VFP 9 the print preview is a VFP form. All you need is to set the Enabled property of the button to .F.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top