cancel
Showing results for 
Search instead for 
Did you mean: 

Query to get InfoObject(ReportObject) from specific Folder

Former Member
0 Kudos

Hi,

I am using XI Release 2.I am having one report object in two folders with the same name.

example: I am having one report object named TestReport that exist in folder ALL as well as folder TEMPORARY in CMS.

Following query i am using:

"SELECT TOP 1 * FROM CI_INFOOBJECTS WHERE SI_PROGID = 'CrystalEnterprise.Report'").append(" AND SI_INSTANCE=0 AND SI_NAME='").append(TestReport ).append("'");

but it always returns the report object from folder ALL while i want to have report Object from folder TEMPORARY

Reporrt Path: path://InfoObjects/Root Folder/Temporary/

Can anyone help me out with the query to get the report object from specific folder?

Thanks

Prakhar Paharia

Edited by: prakhar paharia on Mar 10, 2009 3:43 PM

Edited by: prakhar paharia on Mar 10, 2009 3:44 PM

Edited by: prakhar paharia on Mar 10, 2009 4:17 PM

View Entire Topic
Former Member
0 Kudos

Hello Prakhar,

You are querying the the CI_INFOOBJECTS table for crystal reports that have the name TestReport.

If a crystal with name TestReport exists in folder ALL and another crystal with name TestReport exists in folder TEMPORARY , you should get two INFOOBJECTs with your query!

Look at your query :

SELECT TOP 1 means select one entity.

I guess this is the reason for your problem.

bernd

Edited by: BerndB on Mar 12, 2009 8:42 AM

Former Member
0 Kudos

Thanks berned,

you are right but my problem was to get the report from other folder.i.e since i gets two infoobject & my query picks the top 1 that means it always give me the report from folder ALL since it comes before TEMPORARY.while i want the report from TEMPORARY.

Now it has been solved by using two queries.