finishing report

I want to do a check whether a user is allowd to execute a report. For that i created a new table with the special rights for the executed report. The first line in the report is to check this table. If the check is negative (user not found or user is not allowed) the report should show a message and then terminate. I’ve entered the check-code into trigger “OnInitReport”, but neither EXIT nor BREAK, QUIT or SKIP terminate the report (BREAK and SKIP do, but there is an errormessage, that this command can’t be executed in this trigger). How can i make the report stop if the user may not use the report ? Stefan Weinreich Billing Analyst

In OnInitReport something like this, assuming that newtable has a key of USERID, Object Type (Form, Report etc) and Object number IF NOT Newtable.GET(USERID,Newtable.“Object Type”::Report,99999) THEN ERROR(‘Please see your System Administrator for access rights !’);

thanks often the solution is very easy… Stefan Weinreich Billing Analyst

Why not use the built-in security system? Just remove the line “Report, ID 0” from the All Users Group and add new groups with access to different reports. //Lars

Hey Lars, removin line “Report, ID 0” would mean i had to allow the users explicitly access to all the other reports. The effort for that is too much, hence i prefer to create my own access-rule. The other reason is that within the report the view for some windows is restricted. So some users see some windows and others not. That’s ruled by the entry of the access-table too. Stefan Weinreich Billing Analyst