Creating a session manager

After retrieving the user's information, use the Server member function CreateObject to create a SessionMgr object. The SessionMgr object logs the user on to the system, and if the user is authenticated, creates an EnterpriseSession object. With this object, you can create the InfoStore object, which acts as the main information-retrieving interface between the Crystal Enterprise SDK and the APS.

CreateObject takes a ProgID (Programmatic Identifier) as a parameter. ProgIDs are used to uniquely identify Component Object Model (COM) components. CreateObject searches the local machine's registry for a particular COM DLL associate with the object, loads the DLL, and then has the DLL create the object. If you do not have Crystal Enterprise installed on the server, then CreateObject will not be able to find the SessionMgr object since the DLL that knows how to create it isn't there.

UNIX:    UNIX systems do not have a system registry in the same manner that Windows does. In this case, Crystal Enterprise keeps track internally of its own system files.

Beneath the code that retrieves the user's logon information, add the following.

var SessionManager = Server.CreateObject("CrystalEnterprise.SessionMgr");

Go to next step:

Adding a Logon function



Crystal Decisions, Inc.
http://www.crystaldecisions.com
Support services:
http://support.crystaldecisions.com