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

New Folder in rbFolder

edited July 2013 in End User
Hi

For access control I have added a new field (access_level) onto rbFolder and
this works well, so certain users cannot see the existence of special
reports.

If I create a new sub folder I want to copy the value of access_level from
the original folder (selected in the Folders List) to the new folder.

I have failed to work out how to get the current value before the sub folder
is created and then how to add this to the new sub folder record. The
traditional methods such as on data change etc. do not seem to recognise
which folder is selected in the folder list. I have tried various options
using the Folder Pipeline but drawn a blank.

Can you offer any advice please?

Thanks

Philip L Jackson

Comments

  • edited August 2013

    The folder treeview is initially constructed by reading the plFolder
    datapipeline, but when a treeview folder is selected, the corresponding
    plFolder is /not/ selected.

    To see how a folder is added, check out ppExpForm.pas, the method
    TppReportExplorerForm.ehFileNewFolderClick and ppRptExp.pas, the method
    TppReportExplorer.AddFolder.

    To implement the access_level propagation feature, I would try implementing
    the folder DataSet AfterPost event as follows:

    1. Get the ParentId of the folder that was just added
    2. Perform a DataSet Locate to find the record for the parent folder so you
    can retrieve the access_level.
    3. Perform a DataSet Locate to find the record for the subfolder and update
    it with the access_level.


    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited August 2013
    Great advice - many thanks

    PLJ

This discussion has been closed.