Applicable Versions: 2.01.0152 and above


Often you may wish to control which queries and reports users can create and open by limiting the subjects available through the setup files. This means it is common to want different setup data available for different users.


The DataLocation determines the location from which the setup files should be loaded. If the DataLocation is set to an AppServer (see KB "How do I store my setup centrally on the server rather than on each client?"), DataPA will by default look for the first instance of the setup files in the PROPATH, and send them to the client. This behavior can be overridden with a server-side procedure that can make decisions on which setup files to send based on the username.


Follow the steps below to control setup files based on the user:


Step 1 - Create Server Setup Procedure

The server setup procedure must be called PAGetFile.p and reside in the PROPATH of the AppServer. The procedure receives the username as an input parameter, and a filename as an input-output parameter. You can download example server-side procedures from the downloads section.

The definitions for this procedure should be as follows:

DEFINE INPUT        PARAMETER cUsername AS CHARACTER   NO-UNDO.
DEFINE INPUT-OUTPUT PARAMETER cFileName AS CHARACTER   NO-UNDO.


The username received by PAGetFile.p is the username entered by the user when DataPA connects to the AppServer, if available, otherwise the users Windows username. PAGetFile.p can then change the filename based on the username. An example of the body code for PASecData.p is as follows:

CASE cUsername:
WHEN ""Nick""  
  THEN cFileName = ""C:\DataPA\Data\Nick\"" + cFileName.
WHEN ""Ben""  
  THEN cFileName = ""C:\DataPA\Data\Ben\"" + cFileName.
WHEN ""Freddy""
  THEN cFileName = ""C:\DataPA\Data\Freddy\"" + cFileName.
OTHERWISE cFileName = ""C:\DataPA\Data\Default\"" + cFileName.
END CASE.


Step 2 - Configuring the AppServer to use user specific setup data


To configure the AppServer to use Server-Side security settings simply ensure PAGetFile.p is in the PROPATH for the AppServer. To modify the PROPATH of the AppServer, follow these steps:

    • Copy the connect procedure detailed above into the PROPATH of the AppServer
    • Start Progress Explorer
    • Choose the AppServer
    • Choose Action-->Properties
    • Expand the Agent tree from the Properties dialog box and select General
    • Modify the PROPATH to include the directory containing PAGetFile.p
    • Press OK
    • Restart the AppServer


Step 3 - Configure DataPA to use user specific setup data


If an AppServer is configured correctly to use user specific setup data, simply set the DataLocation to that AppServer (see  KB "How do I store my setup centrally on the server rather than on each client?") to configure the DataPA client to use server-side security.