Restricting a user to a particular report

Hi Everybody, I have a requirement to set the user permissions in such a way that a particular user accesses a particular report only. I have two reports let us say 206 and 207 Now, I want user A to access only report 206 and user B to both 206 and 207. I tried the Printer selection functionality and assigend the user A to report 206. However, when I logon as user A, iam able to run report 207 also. Please let me know how to bring about this and is it possible to enforce this using the printer selctions. If not any other way to do this? Thank you. Ramya

You can check Roles, Permissin to enable people viewing that report. Otherwise you could customize the table user setup with some new field dealing with permission; then put some code on the reports. — Examples: OBJECT Table 91 User Setup { OBJECT-PROPERTIES { Date=20/04/06; Time=10.15.26; Modified=Yes; Version List=NAVW14.00; } PROPERTIES { CaptionML=[ENU=User Setup; ITA=Setup Utente]; LookupFormID=Form119; } FIELDS { { 1 ; ;User ID ;Code20 ;TableRelation=User; OnValidate=VAR LoginMgt@1000 : Codeunit 418; BEGIN LoginMgt.ValidateUserID(“User ID”); END; OnLookup=VAR LoginMgt@1000 : Codeunit 418; BEGIN LoginMgt.LookupUserID(“User ID”); END; ValidateTableRelation=No; TestTableRelation=No; CaptionML=[ENU=User ID; ITA=ID Utente]; NotBlank=Yes } { 2 ; ;Allow Posting From ;Date ;CaptionML=[ENU=Allow Posting From; ITA=Consenti Registraz. da] } { 3 ; ;Allow Posting To ;Date ;CaptionML=[ENU=Allow Posting To; ITA=Consenti Registrazioni fino a] } { 4 ; ;Register Time ;Boolean ;CaptionML=[ENU=Register Time; ITA=Registra Tempi] } { 5600; ;Allow FA Posting From;Date ;CaptionML=[ENU=Allow FA Posting From; ITA=Permetti Reg. Cespiti Da] } { 5601; ;Allow FA Posting To ;Date ;CaptionML=[ENU=Allow FA Posting To; ITA=Permetti Reg. Cespiti A] } { 5700; ;Sales Resp. Ctr. Filter;Code10 ;TableRelation=“Responsibility Center”.Code; CaptionML=[ENU=Sales Resp. Ctr. Filter; ITA=Filtro Centro Resp. Vendite] } { 5701; ;Purchase Resp. Ctr. Filter;Code10 ;TableRelation=“Responsibility Center”; CaptionML=[ENU=Purchase Resp. Ctr. Filter; ITA=Filtro Centro Resp. Acquisti] } { 5900; ;Service Resp. Ctr. Filter;Code10 ;TableRelation=“Responsibility Center”; CaptionML=[ENU=Service Resp. Ctr. Filter; ITA=Filtro Centro Resp. Assistenza] } { 50000; ;Permission Type A ;Boolean } { 50001; ;Permission Type ;Option ;OptionString=[ 1,2,3,4,5] } } KEYS { { ;User ID } } CODE { ************************** OBJECT Report 50490 Test report { OBJECT-PROPERTIES { Date=20/04/06; Time=10.18.57; Modified=Yes; Version List=; } PROPERTIES { OnInitReport=BEGIN IF UserSetup.GET(USERID) THEN BEGIN IF UserSetup.“Permission Type A” = FALSE THEN ERROR(Text0001,USERID); END; END; } DATAITEMS { { PROPERTIES { DataItemTable=Table36; } SECTIONS { { PROPERTIES { SectionType=Body; SectionWidth=12000; SectionHeight=846; } CONTROLS { } } } } } REQUESTFORM { PROPERTIES { Width=9020; Height=3410; } CONTROLS { } } CODE { VAR UserSetup@1000000000 : Record 91; Text0001@1000000001 : TextConst ‘ITA=User %1 doesn’‘t have permission to …’; BEGIN END. } }

The way to achieve this properly the “Navision way” is to use permissions, mostly setting permissions on the underlying table data - report 206 (sales invoice) uses as main tables 112 and 113, report 207 uses 114 and 115 (besides other secondary tables. Therefore you’ll give your first user only access to 112 and 113 and the second user access to all those 4 tables. Check out the Navision installation manual (comes on the installation CD) to get detailed information on how to setup permissions and roles. Saludos Nils