In most cases, each plugin DLL contains a primary object of the same name through which specific InfoObject's properties and methods are accessed. For example, the Report plugin contains a Report object, the User plugin contains a User object, and so on. To access this object from the InfoObject that is returned from a query, you generally use the default interface. For example, the following segment of JavaScript code uses the InfoObject's PluginInterface property to retrieve a Report object from the APS InfoStore:
// Retrieve an InfoObjects collection
InfoObjects = InfoStore.Query ("Select TOP 1 * From CI_INFOOBJECTS Where SI_PROGID='CrystalEnterprise.Report'");
// Retrieve the first report InfoObject.
ReportInfoObject = InfoObjects.Item(1);
// Retrieve the actual Report object.
Report = ReportInfoObject.PluginInterface("");
Note that when PluginInterface is called, its only argument is an empty string: this indicates that the default interface (the Report object) is to be retrieved. Once you have this object, you can use any of the plugin interface's methods and properties. The SDK Reference section of this guide lists the plugin interface published by each plugin.The Query Language Reference section provides information on setting properties that cannot be accessed through a plugin interface.
Before you use the PluginInterface you must make sure that the plugin is installed.
Next: Plugins
Crystal Decisions, Inc. http://www.crystaldecisions.com Support services: http://support.crystaldecisions.com |