Retrieving the destination's InfoObject

Once the plugins have been installed, they are represented in the APS as InfoObjects with a particular ID, much like other InfoObjects. They each have a name as follows: CrystalEnterprise.FTP, CrystalEnterprise.SMTP, and CrystalEnterprise.DiskUnmanaged. The printer options are handled in the Report object itself and do not need a special destination object. When scheduling to all other destinations except the printer, you must first retrieve the appropriate destination object. Each destination InfoObject is stored in the APS system table (CI_SYSTEMOBJECTS) under the Destination Plugins folder. This folder has an ID of 29. When used in conjunction with the plugin's name, the folder ID can be used to retrieve the InfoObject. For example, to retrieve the FTP InfoObject, do the following:

FTP = IStore.Query("Select Top 1* from CI_SYSTEMOBJECTS where SI_PARENTID=29 and SI_NAME='CrystalEnterprise.FTP'").Item(1);

Similarly, for SMTP and Disk:

SMTP = IStore.Query("Select Top 1* from CI_SYSTEMOBJECTS where SI_PARENTID=29 and SI_NAME='CrystalEnterprise.SMTP'").Item(1);

Disk = IStore.Query("Select Top 1* from CI_SYSTEMOBJECTS where SI_PARENTID=29 and SI_NAME='CrystalEnterprise.DiskUnmanaged'").Item(1);

Note:    Always use the SI_PARENTID as well as the name. This ensures that you will retrieve the correct object and not inadvertently retrieve the wrong object with the same name.

Once you have the correct object, you can set the scheduling options:



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