I am trying to capture the name and location of reports within the input store. I want to create a file that contains the ID, Report Title, Path and File Name. Here is the snippet of code I have so far:
Set SessionManager = CreateObject("CrystalEnterprise.SessionMgr")
set Sess = SessionManager.Logon(usr,psw,aps,sec)
set iStore = Sess.Service ("", "InfoStore")
set reports = iStore.Query("SELECT SI_ID,SI_NAME FROM CI_INFOOBJECTS WHERE SI_INSTANCE = 1 AND SI_RUNNABLE_OBJECT = 1 and SI_NAME LIKE 'PCTCR%' )
for each report in reports
File = report.Item(1)
filetxt.WriteLine( Cstr(report.id) & "," & report.title & "," & Path & "," & FileName)
next
In looking at the Query Builder, I see SI_FILE1 and SI_PATH in the SI_FILES property bag contain the information I want. I am having difficulty finding an example of how to extract this information.
If someone can supply the missing pieces of code it would be greatly appreciated.