Home End User
New Blog Posts: Merging Reports - Part 1 and Part 2

Excepion Triggers

edited August 2005 in End User
Chaps

I have a End User Solution that works well.

I now want to introduce ownership of reports to stop people from deleting /
editing each others reports.

I thought I would control this via triggers on the database (RB_ITEMS
table).

In my RB_ITEMS table i have an owner_id integer. When a new report is added
the owner field is updated.

When a user logs on and tries to delete the report or save it (not a save
as) the trigger fires and I can display an exception.

So far so good.

The problem is that once the exception fires I can not get out of the
designer if designing (or select another report if I tried to delete one) as
the exception keeps firing.

It seems that once the exception has fired I cannot continue.

Any ideas ?

This sort of thing should be possible as its pretty basic stuff.

Mark

Comments

  • edited August 2005

    1. Saving/loading custom information

    You can use the Report.Template.OnSaveEnd and OnLoadEnd events to store and
    load custom information to appropriate data fields for the record. (This is
    the technique used by the ReportExplorer.)

    2. Security

    a. Here is an example that shows how to use the Report.Template.OnSaveStart
    event to prevent the user from saving to a specific 'master' folder. You can
    use this same technique to implement security.

    http://www.digital-metaphors.com/tips/EndUserPreventSaveToMaster.zip

    b. You can also try using a live query on the items data to select only the
    items that the user is allowed to see.


    --
    Nard Moseley
    Digital Metaphors Corporation
    http://www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.