Creating a folder

The following procedure assumes you have already logged onto the APS and have a current session (see Authenticating and logging on the user for information on creating a session):

To create a new folder
  1. Retrieve the PluginManager Object.

    The PluginManager allows you to retrieve the Folder plugin, which is needed to create a new folder.

  2. Retrieve the Report plugin by passing the plugin's ProgID to the PluginInfo property of the PluginManager.
  3. Create an empty InfoObjects Collection using the NewInfoObjectCollection Method in the InfoStore Object.
  4. Call the Add Method using the newly created InfoObjects Collection and Folder plugin.

    The Add method creates a new InfoObject based on the type of plugin you give it. In this case, it creates a new folder in the InfoObjects Collection. It is important to note that a folder object is a type of InfoObject.

  5. Set the new folder's properties including its name, description, and location in the folder tree.

    The location in the folder tree is set using the folder's parent ID. If the ID is zero, it is a top level folder; otherwise it is placed under the folder specified by the SI_PARENTID Property.

  6. Commit the new collection to the APS using the Commit Method.

    This adds the new folder to the APS InfoStore.



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