Does it stay up? If not you may have a data problem. You have to make sure that the last thing you do before you send to printer is select the data related to the report. Mike Gagnon
If you want to get the best response to a question, please check out FAQ184-2483 first.
Are you saying that you are happy for the user to preview the report on screen, but you don't want them to be able to print it to paper?
If so, you need to disable the Print button in the Report Preview toolbar. To do that, open the toolbar in the development environment, hold down the Alt key, and drag the Print button off the toolbar. This setting is saved in the resource files (FOXUSER.DBF and FOXUSER.FPT), so you would have to copy these files to the user's system.
I don't understand why you are printing to temp file and then deleting it. That seems unnecessary. Just do REPORT FROM MyReport PREVIEW.
If I have misunderstood the question, please clarify and I will try again.
Mike Lewis
Edinburgh, Scotland
Then if you want to prevent the user to print the report, the recommend method is as I and Mike Lewis suggested, remove the printer icon from the preview toolbar. Mike Gagnon
If you want to get the best response to a question, please check out FAQ184-2483 first.
HI
I have a similar problem.
I would like to give rights to print to one group of users,
and other only to preview.
One methods is FAQ184-1933 to programic change the righs (appear and disappear the printer icon), but on this line:
Use foxuser.dbf Exclusive
I still see a announcement: File is in use.
I can't find what I do wrong.
Could You help me.
Use foxuser.dbf Exclusive
I still see a announcement: File is in use.
Make sure you are using the right foxuser file. Check what path your VFP is using. Tools->options->File locations->Resource File.
For example mine is located here:
"c:\documents and settings\administrator\application data\microsoft\visual foxpro\foxuser.dbf" and in order to make changes you have to use SET RESOURCE OFF
Code:
SET RESOURCE off
USE foxuser.dbf EXCLUSIVE && Should not generate an error
Mike Gagnon
If you want to get the best response to a question, please check out FAQ184-2483 first.
OK It's working.
But I have other problem now.
My application starting from project is working good, when I want the printer button is visible, in other times is not. - OK
But when I'm starting this from *.exe, I never see this button. Why??
My application starting from project is working good, when I want the printer button is visible, in other times is not. - OK
You should be using two "foxuser.dbf" resource fiels. One with the print button vaiable, and one with no print button. And depending on your considtion "switch" between resource files using:
SET RESOURCE TO "c:\noPrint.dbf:
or
SET REOURCE TO "C:\withPrint.dbf"
Mike Gagnon
If you want to get the best response to a question, please check out FAQ184-2483 first.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.