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!

CI_INFOOBJECTS

Status
Not open for further replies.

bigpomp81

Programmer
Jun 3, 2004
5
US
Im logging on as an administrator and very new to CE. Im looking to pull a particular report in vb .net. All the samples I have, provide code for the option of selecting several reports from several users. Im to the point where I need an infostore (or do i???) and need to perform a query for the report. What would I query, all the examples have

Select * from CI_INFOOBJECTS where SI_PROGID = 'CrystalEnterprise.Report' and SI_INSTANCE = 0

Can you help me at least with what si_progid, si_instance, and ci_infobjects is so I can translate the query to retrieving one record....Thanks
 
SI_INSTANCE = 0 will give you report master information, not an instance of the report being run. To get that you want SI_INSTANCE = 1. The ID of a specific run instance is SI_ID. The instance will also have SI_PARENTID matching the SI_ID of the master record.

If that is insufficient, please indicate your CE version when you write back.
 
Most queries are done against CI_INFOOBJECTS.

Try doing

SELECT TOP 100 * from CI_INFOOBJECTS

SI_PROGID is a useful thing to look at, it shows there are various object types held in CI_INFOOBJECTS

Look in the CE_SDK.chm file for SI_PROGID on your Crystal Enterprise CD.

You can list the folders in Crystal Enterprise by doing
SELECT SI_ID, SI_NAME from CI_INFOOBJECTS
where SI_PROGID = 'CrystalEnterprise.Report'

If you have a Folder with a Report in that report will have SI_INSTANCE = 0 and ParentId = SI_ID of the Folder.
All the runs of that particular report that you get when you browse the history of the report will have SI_INSTANCE = 1 and ParentId = the Id of the Parent Report.
It's that simple.

So your first query will need to identify the ParentId with the SI_INSTANCE = 0 first.

eg.

Select SI_ID, SI_NAME from CI_INFOOBJECTS where SI_PROGID = 'CrystalEnterprise.Report' and SI_INSTANCE = 0

Then you can select all rows in CI_INFOOBJECTS with ParentId = the parent Id retrieved in the first query.

eg. pick an SI_ID 71252 from the first query

Select SI_ID, SI_NAME, SI_ENDTIME from CI_INFOOBJECTS where SI_PROGID = 'CrystalEnterprise.Report' and SI_INSTANCE = 1 and SI_PARENTID = 71252

You then need to decide what you want to do with the
instances you have just selected. The SDK Help file will provide you with a list of attributes you can select for a particular instance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top