Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8807403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:21:35+00:00 2026-06-14T02:21:35+00:00

My Question: How do you run and download a report to text? In BusinessObjects,

  • 0

My Question: How do you run and download a report to text? In BusinessObjects, you can download reports as a plain text file. The documentation for the API indicates that you can download reports in various formats. How is this accomplished?

How to download them as PDF: In the documentation, they describe how to download them as a PDF file:

ViewSupport pdfViewSupport = new ViewSupport();
pdfViewSupport.setOutputFormat(OutputFormatType.PDF);
pdfViewSupport.setViewType(ViewType.BINARY);
pdfViewSupport.setViewMode(ViewModeType.DOCUMENT);

RetrieveBinaryView retBinView = new RetrieveBinaryView();
retBinView.setViewSupport(pdfViewSupport);

RetrieveData retBOData = new RetrieveData();
retBOData.setRetrieveView(retBinView);

DocumentInformation docInfo = boReportEngine.getDocumentInformation(struid, null, null, null, retBOData);
BinaryView myBOView = (BinaryView) boDocInfo.getView();
byte[] docContents = myBOView.getContent();

When I change:

pdfViewSupport.setOutputFormat(OutputFormatType.PDF);
pdfViewSupport.setViewType(ViewType.BINARY);
pdfViewSupport.setViewMode(ViewModeType.DOCUMENT);

to

pdfViewSupport.setOutputFormat(OutputFormatType.INT_HTML);
pdfViewSupport.setViewType(ViewType.INT_CHARACTER);
pdfViewSupport.setViewMode(ViewModeType.INT_REPORT_PAGE);

I get the following error:

org.apache.axis2.AxisFault: Binary view of such a document should be only requested with the use of ViewType.BINARY (WRE 01151)

The funny thing is that I set the ViewType to be INT_CHARACTER, not BINARY…

It breaks on the line:

DocumentInformation docInfo = boReportEngine.getDocumentInformation(struid, null, null, null, retBOData);

What I’m trying to do: It’s really complicated, but I basically want to have a report which returns a single row and just prints that on the report (nothing else) and then download that report as text because the text is xml which I use in another program.

Any help would be great!


Note: I’m running on a 3.2 server, but we’ll be upgrading to 4.0 pretty soon. So if the solution could work for both versions, that’d be awesome, otherwise a v4 and v3.x solution would be awesome as well 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T02:21:37+00:00Added an answer on June 14, 2026 at 2:21 am

    The problem this line:

    RetrieveBinaryView retBinView = new RetrieveBinaryView();
    

    So I don’t know how this all works, but this is what you’re looking for:

    ViewSupport viewSupport = ViewSupport.Factory.newInstance();
    viewSupport.setOutputFormat(OutputFormatType.INT_XML);
    viewSupport.setViewType(ViewType.INT_CHARACTER);
    viewSupport.setViewMode(ViewModeType.INT_REPORT_PAGE);
    
    RetrieveData retBOData = RetrieveData.Factory.newInstance();
    
    RetrieveXMLView retXMLView = RetrieveXMLView.Factory.newInstance();
    retXMLView.setViewSupport(viewSupport);
    retBOData.setRetrieveView(retXMLView);
    DocumentInformation boDocInfo = getDocInfo(actions, retBOData);
    XMLView bView = (XMLView) boDocInfo.getView();
    ByteArrayOutputStream out = new ByteArrayOutputStream(bView.getContentLength());
    bView.getContent().save(out);
    byte[] reportBytes = out.toByteArray();
    String reportInString = new String(reportBytes);
    

    However, the reportInString here is XML representing the report. So what I did was encapsulate what I want out of the report with a prefix and suffix. So, for example, let’s say I encapsulate it with @#$ThisIsWhatYouWant- and -End$#@, then I would do the following:

    Pattern patt = Pattern.compile("(?i)@#$ThisIsWhatYouWant-(.*?)-End$#@", Pattern.DOTALL);
    Matcher match = patt.matcher(reportInString);
    if (match.find()) {
      return match.group(1);
    }
    return null;
    

    P.S. This should work for both 3.x and 4.0 BO Servers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a followup question to my other question : Run bat file in
The url: http://www.teamliquid.net/replay/download.php?replay=1830 is a download link to a .rep file. My question is:
I have a site, from which you can download an HTML file. This HTML
Good day, I have one theoretical question. I have an application that run some
maybe this is a stupid question but : i run perl 5.8.8 and i
My question is how to run a multi-threaded program in C by pthread across
THE QUESTION Is it possible to run one tab from a different Activity or
We run code from adress 8002000 to 80020028 and the question is what is
Question: What command do you type in to the Run Application box on ubuntu
Basically the question is how do I run gpgpu code in a Metro app.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.