Skip to Content
avatar image
Former Member

Retrieving Webi report size using BO XI SDK


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?



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Sep 30, 2008 at 05:19 PM

    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.



    Add comment
    10|10000 characters needed characters exceeded

  • Sep 30, 2008 at 05:05 PM

    What are you going to use the size for?

    If what you want to do is get a binary format of the document, then specify the size when streaming out (in content-length), you'd likely use BinaryView.getContentLength() with the ReportEngine.


    Ted Ueda

    Add comment
    10|10000 characters needed characters exceeded