on 09-30-2008 3:18 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Sincerely,
Ted Ueda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.