Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I identify a recurring instance in CI_INFOOBJECTS?

Status
Not open for further replies.

jambu

Programmer
Nov 20, 2002
185
GB
I have a report that in the history tab has 2 instances, 1 is recurring and the other is success.

When I query using the query builder on SI_NAME='ReportName.rpt' I get 3 sets of data One of which has identical PARENT_FOLDERID and PARENT_ID and the remaining two (one of which is the Recurring instance) have the first ones SI_ID as their SI_PARENT_ID.

Am I right in thinking that the first is the report itself and the remaining two are the instances?

How can I filter out everything but the Recurring instance?

thanks in advance.
 
Here is some code from an Access Program (using vba) that I use to get the scheduled instances.

Dim aResult As CrystalInfoStoreLib.InfoObjects
Dim infoStr As String, infoStr2 As String, infoStr3 As String

'' Note the top 2500 is used to get over the default limit of 1000 records

infoStr = "Select TOP 2500 SI_UPDATE_TS, SI_NAME, SI_DESCRIPTION, SI_PATH, SI_OWNER, SI_PARENT_FOLDER, SI_ID, "
infoStr = infoStr & "SI_CREATION_TIME, SI_LAST_RUN_TIME, SI_PROCESSINFO, SI_STARTTIME, SI_ENDTIME, SI_SCHEDULE_STATUS "
infoStr = infoStr & "From CI_INFOOBJECTS Where SI_PROGID='CrystalEnterprise.Report' and SI_INSTANCE=0"

Set aResult = objInfoStore.Query(infoStr)



 
The SI_RECURRING property in the CI_InfoObjects table indicates whether an instance is recurring or not.
 
Thanks cmmrfrds and groggle, much appreciated,I spent ages looking through the SI_ columns and missed that one.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top