cancel
Showing results for 
Search instead for 
Did you mean: 

Get list of unbound reports

0 Kudos

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,

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member185028
Active Participant
0 Kudos

Hi.

I think that your problem is in the following line:

IReport reportinfo = (IReport) report;

You can only cast the infoObject results to IReport when dealing with Crystal Reports. In this case you are dealing with Webi and Deski reports. For the properties that you are dealing with, they are all obtainable from the infoObject so you don't need to cast to IReport.

If you comment out the line <-- IReport reportinfo = (IReport) report; -->, then I believe that your code should work.

Regards.

- Robert

0 Kudos

Hi,

I'm casting the IInfoObject to IReport because I need to get the list of properties. The IReport has a "properties" method from which I'd like to get the SI_UNIVERSE in order to get the SI_TOTAL. In fact, I'm just trying to port this part of the code to Java :

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

I'd like to display only reports from which the universe has been deleted or overwrited, what I would call "unbound reports". I need it in order to repare those reports.

Thank you very much for your help.

Best regards,

ted_ueda
Employee
Employee
0 Kudos

IWebi.getUniverses() or IFullClient.getUniverses() and get the size of the collection.

It's not a IReport instance.

Sincerely,

Ted Ueda

0 Kudos

Hi,

Thank you for your answer, I am now very close to make it work.

I have just one problem, I can't find Iwebi or IFullClient in the libraries, I don't know what jar to import. I have an eclipse project where I imported all the jars from C:\Program Files\Business Objects\Common\4.0\java\lib but when I try to use :

<%@ page import="com.crystaldecisions.sdk.plugin.desktop.webi"%>

or

<%@ page import="com.businessobjects.sdk.plugin.desktop.webi"%>

It does not exist. I am not an expert in the bo sdk, do you know what I have to do?

Thank you very much for your very useful help.

Best regards,

0 Kudos

Actually, it was just a misconfiguration inside the project.

Everything is located inside : com.businessobjects.sdk.plugin.desktop.*

Thank you again for your help.

Have a nice day.

Best regards,