BusinessObjects Board

How can I get latest reportid?

I write just this:


Select * From CI_INFOOBJECTS Where SI_name='myreportname'

and it brings many reports, but they seem all in same folder. In that folder I have one report?

what is this? It brings all versions of reports(when I edited my report it takes new reportid?)

thanks in advance


eg61 (BOB member since 2018-06-21)

That query will bring back anything in the infostore with that name – public reports, personal reports, inbox reports, even folders if they have the same name.

If it’s a WebI report, you can restrict the query with si_kind:

Select * From CI_INFOOBJECTS Where SI_name='myreportname' and si_kind = 'webi'

If the report has been scheduled, then you will get the scheduled instances as well (assuming the names are the same). You can exclude scheduled instances with si_instance:

Select * From CI_INFOOBJECTS Where SI_name='myreportname' and si_kind = 'webi' and si_instance = 0

If you only want to include reports in Public Folders, then you can use si_ancenstor. But this condition can cause the query to run for a long time:

Select * From CI_INFOOBJECTS Where SI_name='myreportname' and si_kind = 'webi' and si_instance = 0 and si_ancestor = 23

And no, you will not get a row for each version of the report – only the most recent is kept.

Joe


joepeters :us: (BOB member since 2002-08-29)

yes you are right, they are in different folder.


eg61 (BOB member since 2018-06-21)