The InfoObject is Crystal Enterprise's generic model used to represent a piece of information or object in the system. It has a few general properties such as its name and ID, and can store any kind of customized property or data. The InfoObject's usefulness lies in its ability to be transformed into any kind of object by a third party via Crystal Enterprise Plugins. These plugins are COM DLLs that define the specific behavior of objectssuch as reports, folders, users, servers, and so onin the Crystal Enterprise system. Both the plugins and the objects that are instantiated by the plugins are InfoObjects that can be stored in, and retrieved from, the APS InfoStore.
Plugins are divided into four categories: desktop, authentication, administration, and destination. The desktop plugins are the only plugins that are dynamic; that is, they are the only plugins from which new InfoObjects are created. The plugins from the other three categories are static, and they cannot be used to instantiate other objects.
To create a new InfoObject, use the PluginMgr object's PluginInfo property to retrieve the appropriate desktop plugin. Then, create a new, empty InfoObjects collection using the NewInfoObjectCollection method, and add the plugin to the collection; this creates a new InfoObject. The following example retrieves the user group plugin, and then uses it to create a new InfoObject that represents a user group. After the Title property and Description property are set for the user group, the new InfoObject is committed to the APS InfoStore.
var PluginMgr = IStore.PluginManager;
var UserGroupPlugin = PluginMgr.Plugininfo("CrystalEnterprise.UserGroup");
var NewInfoObjects = IStore.NewInfoObjectCollection();
NewInfoObjects.Add (UserGroupPlugin);
var NewUserGroup = NewInfoObjects.Item(1);
NewUserGroup.Description = Description;
IStore.Commit (NewInfoObjects);
To uniquely identify the different objects on the APS, the InfoObject has these properties, among others:
This is the programmatic identifier of the object. The ProgID identifies what type of object the InfoObject actually is. For example, the ProgID of each report in the system is CrystalEnterprise.Report.
This uniquely identifies the object from all other objects in the system.
Next: APS InfoStore.
Crystal Decisions, Inc. http://www.crystaldecisions.com Support services: http://support.crystaldecisions.com |