BusinessObjects Board

How do i list the reports in a particular folder

Hi,

I am trying to create a script which will create a BIAR file automatically. However that should contain all the reports of a specific folder. I got this this working, but need it for reports in specific folders only.

I think in Query Builder nested queries wont work :frowning:

So how do i get the list of all the reports from a specific folder ?

I have the following query but it needs some more stuff to get a list of all the reports of specific folder.

Select SI_ID, SI_NAME From CI_INFOOBJECTS Where SI_PROGID=‘CrystalEnterprise.Folder’

Regards,
Prashant


prashant.saduwale (BOB member since 2010-03-19)

You could try a relationship query, check out this post
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/11238


jwhite9 :us: (BOB member since 2006-07-28)

Hi,

this should work

SELECT * FROM CI_INFOOBJECTS
WHERE children("SI_NAME='folder hierarchy'", "SI_NAME = '<folder name>'")
AND SI_PROGID='CrystalEnterprise.Folder' 

And more examples of queries in this topic CMC Query Library


agulland :uk: (BOB member since 2004-03-17)

Hi agulland,
Thanks for your response, I tried the query which you provided but it did not me me any output, it just said 0 results.

Let me tell you the folder structure: Public Folders\Client Portal\Custom
- Public Folders
- Client Portal

- Custom
- Folder A (several reports in these folders)
- Folder B
- Folder ‘N’

Now what i want to achieve is I want to create a BIAR file which will back up all the contents for Custom Folder
Here is wht i tried:

SELECT * FROM CI_INFOOBJECTS
WHERE children(“SI_NAME=’ Public Folders\Client Portal’”, “SI_NAME = ‘Custom’”)
AND SI_PROGID=‘CrystalEnterprise.Folder’

but this query did not work, please assist.

Regards,
Prashant


prashant.saduwale (BOB member since 2010-03-19)

in the children function the first part needs to be “SI_NAME=‘folder hierarchy’” have you tried,?

SELECT * FROM CI_INFOOBJECTS
WHERE children("SI_NAME='folder hierarchy'", "SI_NAME = 'Custom'") 
AND SI_PROGID='CrystalEnterprise.Folder' 

AL

PS when inserting code to a post please embed your text within [code] tags - it is easier to read, thanks


agulland :uk: (BOB member since 2004-03-17)

Yes, I did try that but it gave me no records with a message: :frowning:

Number of InfoObject(s) returned: 0

SELECT * FROM CI_INFOOBJECTS 
WHERE children("SI_NAME='Public Folder\Client Portal'", "SI_NAME = 'Custom'") 
AND SI_PROGID='CrystalEnterprise.Folder' 

There are few more folders on Custom folder and want to back up only the custom folder with command line biar file. I got this automated but need this query to get the proper output.

I’m just struggling with the query part of it now !! :hb:

Regards,
Prashant


prashant.saduwale (BOB member since 2010-03-19)

Try with this query,it will retreive everything under the “Custom” folder


SELECT * FROM CI_INFOOBJECTS 
WHERE descendants("SI_NAME='Folder Hierarchy'", "SI_NAME = 'Custom'") 

AlexMax09 (BOB member since 2009-11-11)