Adding a user account

To add a user account, you will want to include the following information:

Once you have this information, you add a new user account in much the same way that you add any other object such as a report. The basic steps in creating a new object are:

Example

var PluginMgr = IStore.PluginManager;

var UserPlugin = PluginMgr.PluginInfo("CrystalEnterprise.User");

var NewInfoObjects  = IStore.NewInfoObjectCollection();

NewInfoObjects.Add (UserPlugin);

var InfoObjs = NewInfoObjects.Item(1);

var NewUser = InfoObjs.PluginInterface("");

InfoObjs.Title = AccountName;

InfoObj.Description = Description;

NewUser.FullName = UserName;

NewUser.Connection = NamedUser;

NewUser.PasswordExpires = PasswordNeverExpires;

NewUser.ChangePasswordAtNextLogon = MustChangePassword;

NewUser.AllowChangePassword = CannotChangePassword;

NewUser.NewPassword = Password;

IStore.Commit (NewInfoObjects);

Remarks

To retrieve the User plugin, you can use the PluginManager object's PluginInfo property to specify the ProgID of the User plugin: CrystalEnterprise.User. When setting the properties for the new account, two different methods are used.



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