on 04-09-2010 7:48 AM
Hi
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.
try
{
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.reset();
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Type", "application/vnd.ms-excel");
response.setDateHeader("expires", 0);
com.businessobjects.rebean.wi.Report report = doc.getReports().getItem(0);
report.setPaginationMode(PaginationMode.Listing);
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();
response.getOutputStream().write(abyBinaryContent);
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.
Hi -
Page numbering does not exist when a report's PaginationMode is set to Listing. It's like telling a submarine to drive with wheels it doesn't have on a road it's not on.
Hope this helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I must apologize - despite my interesting submarine analogy, listing mode actually does work fine when retrieving pagination objects - so let's eliminate that from this discussion.
I just installed the sample for XLS output w/ report pagination and it works like a charm::
Can you try and implement this sample and see what it comes up with?
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.