The next step is to query the server using the Query Method that is provided by the InfoStore
object.
Set Result = IStore.Query(Query)
The result, which is an InfoObjects
collection, is parsed in order to retrieve the selected items. The InfoObjects
collection contains numerous properties of various types, some of which may be simple properties and some of which may be containers or property bags. A property bag may contain more property bags, which may contain additional property bags, and so on. For now, however, only two of these properties are of interest:
The final step in this function is processing the results of your query using the Count
and Item
properties named above. If Count is greater than zero, then the parameters IDs
and FolderNames
will be populated with the requested data. Paste the following code into your file to finish the function.
'Check that there are folders to view.
'Reallocate the array to make room for the folder names.
Redim FolderNames(Result.Count)
'Retrieve the folder IDs from the query result.
Note that the ID
property is accessed directly without using the Properties
collection. More often than not, however, the Properties property will need to be used in order to access properties in the list. This will be illustrated later in Creating an "Up a Level" link.
RetrieveChildFolders
now provides us with a list of child folders given their parent folder's ID
number. You may recall, however, that your original intention was to list all the topRetrieveChildFolders
like this:
RetrieveChildFolders(IStore, 0, FolderNames, IDs)
For a complete version of the RetrieveChildFolders
function, see Folders.csp.
Crystal Decisions, Inc. http://www.crystaldecisions.com Support services: http://support.crystaldecisions.com |