Skip to Content
0
Jan 18, 2011 at 04:37 PM

Get list of unbound reports

78 Views

Hi all,

I would like to get a list of all unbound reports because the new way of identifying universes in BO (by CUID) is creating a lot of troubles with my users and they don't see what's wrong when they delete or overwrite a universe on our CMS.

I've seen this code in VB :

'Grab all Webi templates
        sQuery = "SELECT SI_Name, SI_PARENT_FOLDER, SI_CREATION_TIME, SI_Universe FROM CI_INFOOBJECTS WHERE (SI_Kind = 'Webi' or SI_Kind = 'FullClient')  and si_instance = 0"
        ceInfoObjects = ceInfoStore.Query(sQuery)

        Response.Write("<b>Webi and Deski documents with no Universe</b>" & "<BR><BR>")
        Response.Write("<table border=1 cellspacing=2>")

        Response.Write("<tr><td><b>Document Name</b></td>")
        Response.Write("<td><b>Folder ID</b></td>")
        Response.Write("<td><b>Creation Date</b></td></tr>")


        'Loop through the objects for the universe ids of webi docs
        For Each ceInfoObject In ceInfoObjects

            If ceInfoObject.Properties("SI_Universe").Properties("SI_TOTAL").Value.ToString = "0" Then

                'Output name of the doc
                Response.Write("<tr><td>" + ceInfoObject.Properties("SI_Name").ToString + " </td>")
                Response.Write("<td>" + ceInfoObject.Properties("SI_Parent_Folder").ToString + " </td>")
                Response.Write("<td>" + ceInfoObject.Properties("SI_CREATION_TIME").ToString + " </td></tr>")

            End If

        Next

And I would like to write it in Java for my application under tomcat. I've tried :

IInfoObjects ureports = infoStore.query("SELECT SI_Name, SI_PARENT_FOLDER, SI_CREATION_TIME, SI_Universe FROM CI_INFOOBJECTS WHERE (SI_Kind = 'Webi' or SI_Kind = 'FullClient') and si_instance = 0");

if (ureports.size() != 0)
	{
    // Retrieve each server group from the collection and build the
    // drop down box. Set the server group's ID as the value for the
    // option element. This will garauntee its uniqueness.ENDLOC_
    for (int i = 0; i < ureports.size(); i++)
        {
    		
	        report = (IInfoObject) ureports.get(i);
	        IReport reportinfo = (IReport) report;
	        
	
	        if (reportinfo.properties().getProperty(CePropertyID.SI_UNIVERSE).getProperty(CePropertyID.SI_TOTAL).getValue()==0)
            {
		        HTMLString = HTMLString + "<tr><td>" + reportinfo.getID() + "</td>"
		                                + "<td>" + reportinfo.getTitle() +"</td>"
		                                + "<td>" + report.getParent().getTitle() +"</td>";
            }
	    }

But I have a problem with the SI_TOTAL property. What I would like to do is to write in Java the part of the code :

IIf ceInfoObject.Properties("SI_Universe").Properties("SI_TOTAL").Value.ToString = "0"

Do you have any idea of how I could do it?

I've tried to find an answer but I don't see any. I'm sure one of you know the solution.

Thank you in advance for all the help and information you could provide.

Best regards,