cancel
Showing results for 
Search instead for 
Did you mean: 

BOXI API does not respect the filter to limit number of records displayed.

Former Member
0 Kudos

Support Case for BOXI

Title: BOXI API does not respect the filter to limit number of records displayed.

BOXI version: Business Objects boe XIR2 SP2

OS: PARISC HPUX 11.11

Description:

In the report, there is a filter to limit the number of SLAs in u201CBottom 10 SLAsu201D to be <=3.

It works correctly while viewing the report using InfoView web interface. The total is 5 and in the upper table shows only 3.

However the filter is not work in the API. The report is generated by using BOXI API, the java code is listed at the bottom for your reference.

I confirm by checking the output, the result from API does not respect the filter as it did in InfoView web interface.

-


import com.businessobjects.rebean.wi.*;

DocumentInstance doc = serverSession.getDocumentInstance(getDocumentName(), repoType);

// -


Get generated HTML -


ReportImpl rep = (ReportImpl) doc.getReports().getItem(0);

rep.setPaginationMode(PaginationMode.Listing);

rep.setReportMode(ReportMode.Viewing);

m_boHtmlDoc = getHTML(rep);

protected String getHTML(ReportImpl rep)

throws ReportErrorException {

XMLView vx = (XMLView) rep.getView(OutputFormatType.XML);

byte[] xml = getBOXML(vx);

ByteArrayOutputStream html

= transformBOXMLtoHTML(xml, rep.getDocument());

return getString(html);

}

Any one who encountered this before? From my side I think it is a bug, so I post this message asking for help and hope it can be fixed soon.

I can send you screen shot if needed, thanks!

Accepted Solutions (0)

Answers (1)

Answers (1)

ted_ueda
Employee
Employee
0 Kudos

Usually, any bugs in the SDK can be reproduced in InfoView, since it uses the same SDK.

There's not enough info here.

Sincerely,

Ted Ueda

Former Member
0 Kudos

If you like I can send you an email with screen shot for more information. For this forum is not able to post images. Thanks!

ted_ueda
Employee
Employee
0 Kudos

When I say 'not enough information', I'm not talking about observed behavior, but differences between InfoView code and your app code. Screenshots will likely not help in this regard.

For example - did you refresh the document after setting the filter?

If you do want assistance with this, I recommend you opening a support ticket.

Sincerely,

Ted Ueda

Former Member
0 Kudos

> differences between InfoView code and your app code.

I have put the code in the initial post, it is all that have been used in the application. I suppose it works well on BO v6.5 since the application is upgraded to BOXI after end of support of v6.5.

I would certainly like to enter a support ticket, for I am sure the behavior is different between the code and the InfoView and the customer is waiting for the fix. So please tell me how, thanks!

You can also create a simple application with the code, to reproduce the error.

ted_ueda
Employee
Employee
0 Kudos

If you're working with Enterprise, then you or your client would have a support contract with SAP Business Objects. Your organization or your client's organization would have someone be a Super Admin for SAP Business Objects support.

You'll contact that person in your organization to have a ticket opened.

In your simple code, you don't describe how the document is opened, check to see whether the correct document is being opened, nor is the transformation from XML to HTML is described. You also haven't stated whether you're refreshing the document or not.

Did you refresh? You still haven't answered my question on this.

Did you check the code that's retrieving the document? I see that you're referring to the document by name only?

Since you're migrating from 6.5 to XI, document retrieval would have to have been rewritten. It's not described in your little code snippet.

You have not provided sufficient info.

Since InfoView doesn't display this issue, there's likely a bug in your code.

Sincerely,

Ted Ueda

Former Member
0 Kudos

> In your simple code, you don't describe how the document is opened,

> check to see whether the correct document is being opened, nor is the

> transformation from XML to HTML is described. You also haven't stated

> whether you're refreshing the document or not.

Now I have put the code been used in detail, but as you can see, others are not quite important. All code to transform from XML to HTML is here. Of cause I did refreshed the document.

> Did you check the code that's retrieving the document?

> I see that you're referring to the document by name only?

Yes, the code to get the report document is by name. See detail in the code listed below.

> Since you're migrating from 6.5 to XI, document retrieval would have to have been rewritten.

> It's not described in your little code snippet.

As I remember there are some API calls have been changed, but now the code listed here is the last version in production. You can see how it get document using the API.

> You have not provided sufficient info.

> Since InfoView doesn't display this issue, there's likely a bug in your code.

I am wondering what information you need? For the code I listed I think that is all in my application. That is why I suggest you create a simple report document with filter to limit the number of rows displayed, and compare both in the InfoView webpage and the code generated output. My scenario shows the XML is already not respect the row limit set in filter.

> Since InfoView doesn't display this issue, there's likely a bug in your code.

I donu2019t agree, as I said InfoView display well but the result get by API does not. Please check the code listed below, that is all been used in my application. Which part do you suspect will have bug?

Here goes the more detailed code:

-


import com.businessobjects.rebean.wi.*;

/** Get report engine bean by key from http request. */

ServerSession wisession = (ServerSession) request.getSession().getAttribute("serverSession");

DocumentInstance doc = serverSession.getDocumentInstance(getDocumentName(), repoType);

// -


Get generated HTML -


ReportImpl rep = (ReportImpl) doc.getReports().getItem(0);

rep.setPaginationMode(PaginationMode.Listing);

rep.setReportMode(ReportMode.Viewing);

m_boHtmlDoc = getHTML(rep);

protected String getHTML(ReportImpl rep)

throws ReportErrorException {

XMLView vx = (XMLView) rep.getView(OutputFormatType.XML);

byte[] xml = getBOXML(vx);

ByteArrayOutputStream html

= transformBOXMLtoHTML(xml, rep.getDocument());

return getString(html);

}

protected byte[] getBOXML(XMLView xv) {

ByteArrayOutputStream out = new ByteArrayOutputStream();

xv.getUTF8Content(out);

return out.toByteArray();

}

-


private Report m_meta = null;

private String m_reportName = null;

private String m_repositoryType = null;

public static final String DEFAULT_REPO_TYPE = "personal";

public String getReportName() {

return m_reportName;

}

public String getRepositoryType() {

String result = m_repositoryType;

if (null == m_repositoryType) {

if (null != m_meta) {

result = m_meta.getRepositoryType();

} else {

result = DEFAULT_REPO_TYPE;

}

}

return result;

}

ted_ueda
Employee
Employee
0 Kudos

Do you refresh your document in code?

Do you check the document to ensure you're getting the correct one?

If you don't know how to answer the above, I strongly recommend opening a support ticket.

Sincerely,

Ted Ueda

Former Member
0 Kudos

> Do you refresh your document in code?

> Do you check the document to ensure you're getting the correct one?

Yes I did refreshed the doc in code, and was sure getting the correct one.

> If you don't know how to answer the above, I strongly recommend opening a support ticket.

Thanks, so I will try to open a support ticket.