cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving report data through webservice SDK

Former Member
0 Kudos

Hi,

This is with reference to the thread in the below link.

How to achieve the same using Webservice SDK?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I had tried this using the following piece of code

ViewSupport xmlViewSupport = new ViewSupport();

xmlViewSupport.setOutputFormat(OutputFormatType.XML);

xmlViewSupport.setViewType(ViewType.XML);

xmlViewSupport.setViewMode(ViewModeType.REPORT_PAGE);

RetrieveXMLView retXMLView = new RetrieveXMLView();

retXMLView.setViewSupport(xmlViewSupport);

RetrieveData retBOData = new RetrieveData();

retBOData.setRetrieveView(retXMLView);

DocumentInformation docInfo = engine.getDocumentInformation("6801", null, null, null, retBOData);

com.businessobjects.dsws.reportengine.XMLView myBOView = (XMLView) docInfo.getView();

myBOView.getContents();

But with the above code I get an XML like

<document xmlns='http://www.businessobjects.com/2003/ro' xmlns:ro='http://www.businessobjects.com/2003/ro' unit="pixel">

<media>

<property name="mode.selected">paginated</property>

<property name="output.format.xml.valuemode">yes</property>

<property name="output.limit.size">5120</property>

<property name="output.selected">xml.ro</property>

<property name="output.unit">pixel</property>

</media>

<report rid="11122">

<styledict>

<style sid="1">

<background rgb="#ffffff"/>

</style>

<style sid="4">

<border side="all" rgb="#000000" thick="0" style="none"/>

</style>

</styledict>

<page sid="1" num="1" format="A4" h="1121" w="793" lastpage="true">

<page_element type="header" ref="2jo.2jq" bid="11124" x="76" y="76" h="48" w="642" sid="1" rinfo="0:0;1:0;" cinfo="0:0;1:0;"></page_element><page_element type="body" ref="2jo.2jn" bid="11121" x="76" y="124" h="874" w="642" sid="1" rinfo="0:0;1:250;" cinfo="0:0;1:400;"><graph ref="2jo.2kF" bid="11151" h="250" w="400" sid="4"><blob key="TMP3283" type="image/gif" pixel_width="400" pixel_height="250" /></graph></page_element><page_element type="footer" ref="2jo.2jx" bid="11131" x="76" y="998" h="48" w="642" sid="1" rinfo="0:0;1:0;" cinfo="0:0;1:0;"></page_element></page></report>

</document>

I am not sure how this can be used for display ..

I need the report data and want to use it in my jsp instead of displaying the reports generated by BO.

Am I missing any info here?

Edited by: Thangamani Ramasamy on Sep 24, 2008 10:01 AM

Former Member
0 Kudos

Also, from by examining the output XML, it seems like your report contains a graph and not textual data.

In that case, you cant export it as a XML, but have to choose other formats like PDF, WORD.

Try generating the report in any of the above mentioned formats, and your problem will be solved.

Cheers,

Pradeep Chellur.

Former Member
0 Kudos

Thanks Pradeep , your previous answer helped me to resolve the issue. I was able to see the data. I am more interested in the seeing the data used for the report and not the actual report itself. Hence I prefer to view the data in XML format and your post helped me .

I am also trying to extract data(in XML Format) for a html table that is generated in BO , using the above code, but it fails with the null pointer exception , can you please provide some pointers on the same as well.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Try adding the following parameters to your getDocumentInformation() call....

Navigate nPage = new NavigateToLastPage();

Action[] actions = new Action[1];

actions[0] = new Refresh();

add these parameters as shown below,

DocumentInformation docInfo = engine.getDocumentInformation("6801", null, actions, nPage, retBOData);

Also, make sure that the report with UID 6801 is present and accessible to the current logged-in user.

Should Work,

Pradeep.

Edited by: Pradeep Kumar on Sep 24, 2008 2:19 PM