Restrict Print Rights to users (1 Viewer)

Futures_Bright

Registered User.
Local time
Today, 21:29
Joined
Feb 4, 2013
Messages
69
Hi all,

I've been asked to make sure only certain users in my database are able to print anything (i.e. Administrators). Is there any option/property to do this?

I have already built in User Access controls using the ctl.Tag property. The only way I can think off the top of my head is when a 'general user' uses it, to ensure that every control is displayed 'on screen only'. This of course doesn't stop them printing - just makes them print blank pages!
 

TJPoorman

Registered User.
Local time
Today, 14:29
Joined
Jul 23, 2013
Messages
402
Not sure if this would work, but perhaps placing something in the Header's Format event to check if the user is Admin. If not then cancel.
 

Cronk

Registered User.
Local time
Tomorrow, 06:29
Joined
Jul 4, 2013
Messages
2,772
Place the code in the Report's on open event, something like

Code:
if UserStatus <>"Admin" then
  cancel = true
endif
 

TJPoorman

Registered User.
Local time
Today, 14:29
Joined
Jul 23, 2013
Messages
402
Place the code in the Report's on open event, something like

Code:
if UserStatus <>"Admin" then
  cancel = true
endif

The problem with this is going to be that your basic users will not even be able to view the reports.
 

Cronk

Registered User.
Local time
Tomorrow, 06:29
Joined
Jul 4, 2013
Messages
2,772
If the rendering in the Header in cancelled as you suggest, but other report sections including Detail would be displayed. If have a cancel in every section, then the report would be blank.
 

TJPoorman

Registered User.
Local time
Today, 14:29
Joined
Jul 23, 2013
Messages
402
No, because the Format event only happens when opening the report as print or print preview. If you open the report using acViewReport, this event does not fire.
 

Cronk

Registered User.
Local time
Tomorrow, 06:29
Joined
Jul 4, 2013
Messages
2,772
In that case, yes.

Only problems would be if there was anything in the Page header and if the print button is not disabled.
 

TJPoorman

Registered User.
Local time
Today, 14:29
Joined
Jul 23, 2013
Messages
402
Or.... You could create an AutoKeys macro with Ctrl+P having an execute code function that could check your admin status.
 

Futures_Bright

Registered User.
Local time
Today, 21:29
Joined
Feb 4, 2013
Messages
69
Apologies for my lack of comment on this thread - found a few more bugs to squish before I sort this feature out!

Or.... You could create an AutoKeys macro with Ctrl+P having an execute code function that could check your admin status.

Would making an onkeypress event for Ctrl+P overrule the office default?

I'll test these out when I get a chance (which could be next week or next month at the moment!), thanks for the help guys.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 21:29
Joined
Sep 12, 2006
Messages
15,658
if a user can "see" something in a form - can they not either

a) print the from or even
b) just cut and paste from the from to some other app

are you just trying to save paper, or prevent users seeing the data.
 

Futures_Bright

Registered User.
Local time
Today, 21:29
Joined
Feb 4, 2013
Messages
69
Hi Gemma,

To answer your questions: Firstly (just to clarify - in case this has some input to the solution) 'users' can only see reports (and only navigation forms which there is no need to protect printing of). They need to be able to see the data.

The contents of my database are revision controlled, so the goal is just to try and prevent (as far as is realistically possible) the use of obsolete data (i.e. where they have printed it off and may refer to it again in future rather than see current data within the database).

As said in my original post, I can set everything to view 'on screen only' for 'Users', but if I can go a step further and prevent 'Users' from printing at all (while allowing 'Administrators' to do so) with relative ease I would rather do this and save some paper and wasted effort.

To be honest, part of the motive for this is to ensure that it is clear if any data is printed off it entirely the User's responsibility to ensure the accuracy of the data - if a user prints screenshots of the reports, or copy and pastes the data then they have created their own documentation. I'm personally hoping that the navigation to the current data is easy enough to prevent this being necessary anyway (although I will need to include it to ensure control)!
 

Users who are viewing this thread

Top Bottom