Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Retrieving Webi report size using BO XI SDK

Hi,

How do I retrieve the size of the BO Webi report using BO XI SDK? I am migrating a java application from BO 6 to BO XI, and in the existing code WIDocument.getDocSize() is used to retrieve the report size. What is the equivalent of this in BO XI?

Thanks,

Subham

Former Member
replied

Hi Subham,

If you are looking for the size of the WID file, you can get this through the InfoObject.

Please note that this WID file only changes if the WebI document was actually saved.

Below is a sample code snippet that will retrieve the file size from an InfoObject:

IInfoStore boInfoStore = (IInfoStore) boEnterpriseSession.getService("InfoStore");
                                    
String query = "SELECT SI_FILES FROM CI_INFOOBJECTS WHERE SI_INSTANCE='false' AND SI_NAME='" + webiDoc + "'";
IInfoObjects boInfoObjects = boInfoStore.query(query);
if (boInfoObjects.size() > 0) {
     IInfoObject boInfoObject = (IInfoObject) boInfoObjects.get(0);
                                                
     IFiles boFiles = boInfoObject.getFiles();
     IFile boFile = null;
     for (int i=0; i<boFiles.size(); i++) {
         boFile = (IFile) boFiles.get(i);
         out.print(boFile.getName() + ": " + boFile.getSize() + "<BR>");
     }
} else {
      out.print("No WebI document found!");
}

Hope this helps.

Regards,

Dan

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question