Skip to Content

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

Could not get page number. (Error: RWI 00223)


I am using the following code to open a webi scheduled instance in Excel format.But I am getting a error n the highlighted line.



int intDocID = Integer.parseInt(strDocID);

String userName = (String) BoeUtil.getSessionVariable(request, SessionAttributes.RPT_USER);

IInfoStore iStore = (IInfoStore) BoeUtil.getInfoStore(request, userName);

String strQuery = QueryBuilder.viewDocument(strDocID);

IInfoObjects iDocuments = iStore.query(strQuery);

IInfoObject iDocument = (IInfoObject) iDocuments.get(0);

String strKind = iDocument.getKind();

// Instantiate appropriate ReportEngine according to

// document type ReportEngine repEng = null;

ReportEngines reportEngines = (ReportEngines) BoeUtil.getReportEngines(request, userName);

ReportEngine repEng;

if (strKind.equals("Webi")) repEng = reportEngines.getService(ReportEngineType.WI_REPORT_ENGINE);

else repEng = reportEngines.getService(ReportEngineType.FC_REPORT_ENGINE);

if (strKind.equals("Webi"))


DocumentInstance doc = repEng.openDocument(intDocID);



response.setHeader("Content-Type", "application/");

response.setDateHeader("expires", 0);

com.businessobjects.rebean.wi.Report report = doc.getReports().getItem(0);


logger.debug("Pagination Mode"+report.getPaginationMode());

Object docBinaryView = report.getView(OutputFormatType.XLS);

// output the binary stream via the response object

byte[] abyBinaryContent = ((BinaryView) docBinaryView).getContent();


The exception says Could not get page number. (Error: RWI 00223)

I have triedcopying all the jars from infoview.And the doc Id is also checked but still I am facing this exception.

I am usig XiR2 and this is working fine in infoview.

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