Security in Navision

Reporting It’s possible to authorize a group of user to preview and don’t print a report.

You can’t hide the Print/Preview buttons, but you can put code on the OnPreReport to check if the report is run in Preview mode. Check this against the User properties and Error out if they are not allowed. Chris Krantz NCSD,NCSQL,MCSD,MCSE Microforum Inc. Toronto, Ontario, Canada

Thank’s for lot

Take a look at Navisions way of handling this in report 205 (Order confirmation). IF NOT CurrReport.PREVIEW THEN __SalesCountPrinted.RUN(“Sales Header”); SalesCountPrinted is a codeunit. Now you can use user-permissions to authorize this codeunit.

User Setup Table: add field : allowed to print (boolean) Report to be checked: var rUser record User setup On the first dataitem: OnPreDataItem IF NOT CurrReport.PREVIEW THEN BEGIN CLEAR (rUser); rUser.RESET; if (rUser.GET(USERID)) THEN BEGIN IF (NOT RUser.“allowed to print”) THEN ERROR(‘Your not allowed to print error message’); END ELSE // If you’re not having user’s setup yet on your system // if you’re allowing them if not… then remove the else // and the last error line and replace by ; ERROR(‘Your not allowed to print error message’); END; Alfonso Pertierra (Spain)