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

Changing session parameters on the server

edited April 2003 in Server
Hi,

I've got the following situation :

I'm building a rbserver application which serves raf file archives.
Depending
on which users logs in (by using the webclient) the explorer tree
has to be build with certain reports. I know there is a custom parameter
demo which shows this, but my situation is a little bit different in the
fact
that not the user decides on what he/she wants to see (in the sample all,
red, bleu etc.).
But the user rights (which are stored in a database) dictate the explorer
treeview.
So I would like to build the explorer tree depending on user report rights
from the database,
and I would like to do this in the rbserver application. I know that I can
use
the OnGetDirectory event of the TrsReportArchiveVolume for this, but this
event is triggerd very often and I don't like to connect to the database and
look
for the user report rights every time as this events triggers. So I thought
maybe
I can use the session parameters for this and fill them with values by the
rbserver
itself and not the webclient, but it seems that this is not possible are
these readonly on the server ?
I have tried to change the session parameters in both events of the
TrsServer.
So are there any other options ? So that I only have to look for the report
rights once
and after that can pick them from memory instead of the database.
I also would like to still be able to use the caching model.

greetings,

Rob Segerink
Novo-Wallco International

Comments

  • edited April 2003
    After some more trial and error...

    I've found out that I can change the session parameters in the
    BeforeBuildDirectory event of the ReportArchiveVolume component.
    So if I connect to the database in this event and fill the parameters and
    use these parameters in the OnGetDirectory event to change
    the report catalog view everything should work ok ?

    greetings,

    Rob Segerink
    Novo-Wallco International



  • edited April 2003

    1. The BeforeBuildDirectory event fires just prior to a new directory tree
    being built..

    2. You likely need to turn off volume directory caching. With the current
    architecture, there is only one instance of the volume directory cached on
    the server (there is NOT one per client session).

    2. The OnGetDirectory event passes a copy of the volume directory that can
    be altered prior to sending the directory to the client. This does not
    affect the singleton volume directory that is cached on the server.



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

    Best regards,

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