How to block reports

Hello, I’d like to know the instructions set to block the access to a determinate report dependig the user. Thanks and a greeting.

Hi, You could take a look at the following thread. I found it using the search functionality on this site. [;)] http://www.mbsonline.org/forum/topic.asp?TOPIC_ID=6145&SearchTerms=define,roles,users In short: What you need to do is define a role (Tools, security, roles) and add this role to a database login (Tools, security, database logins). Defining the role contains settings permissions on reports. I would suggest to use Help in Navision. Search for security. It’s very helpful.

Thanky you, but I would like do this programming without roles. I mean, for example, writing on the C/AL Editor from the report something like this: IF USERID = ‘MARK’ THEN CurrReport.SHOWOUTPUT(FALSE); Thank you in advance.

You could place the following code in the OnInitReport: if USERID = 'TINOR' then error('You are blocked from this report');

quote:

Thanky you, but I would like do this programming without roles. I mean, for example, writing on the C/AL Editor from the report something like this: IF USERID = ‘MARK’ THEN CurrReport.SHOWOUTPUT(FALSE); Thank you in advance.
Originally posted by Navicom - 2005 Sep 14 : 09:48:05

Nooooooooo !!! [V] this is not the way to do it. I know that you are trying to make life easy by adding an EXCLUDE funciton, but this will in the end cost the customer a lot more than doing the job properly. Also in addition to the link already given, this toppic was discussed a few times in the last month or so. You can use this as the basis of a tool to create Roles that allow all reports, then reomve the ones that are not allowed. Adding Permissions to a Role.http://www.go-live.us/prod01.htm PS THere are cases where this process makes sense, but NOT in this case.

Thank you all. I’ll try your advice. Thanks and regards.