The following properties describe those properties related to the processing of an InfoObject. For example, it contains all the properties a report would need in order to create an updated instance of itself. Most of these properties are set through the Report object, and they are all contained within the SI_PROCESSINFO property bag. To retrieve the values of these Report object properties from the result set of a query, you must query for SI_PROCESSINFO first.
SELECT SI_ID FROM CI_INFOOBJECTS WHERE SI_ID = 123 AND SI_SCHEDULEINFO.SI_SUBMITTER = 'WRichards'
The following example retrieves the processing information for all of the reports in the system:
QueryResult = InfoStore.Query ("Select SI_PROCESSINFO From CI_INFOOBJECTS Where SI_PROGID='CrystalEnterprise.Report'")
GF = QueryResult.Item(Index).PluginInterface.GroupFormula
It is better to limit the number of objects that need to be retrieved. For example, you could request a single report:
QueryResult = InfoStore.Query("Select SI_ID, SI_NAME From CI_INFOOBJECTS Where SI_NAME in ('Report1')
ReportId = QueryResult.Item("Report1").ID
QueryResult = InfoStore.Query ("Select SI_PROCESSINFO, SI_NAME From CI_INFOOBJECTS Where SI_ID = " & ReportId)
GF = QueryResult.Item(Index).PluginInterface.GroupFormula
For more information on optimizing your queries, see Performance issues.
Crystal Decisions, Inc. http://www.crystaldecisions.com Support services: http://support.crystaldecisions.com |