com.businessobjects.rebean.wi
Interface ReportParts


public interface ReportParts

Represents a collection of ReportPart and provides a way to access report parts output.

Example: Access report part output by passing ReportPart reference

DocumentInstance wiDoc = repEng.openDocument(Integer.parseInt(strDocId));
String[] reference = new String[1];
//Find the report part reference by getting XMLView of the document.In the XMLView, you will find only temporary reference(for example,<bag layout="bag" index = "Caroline" ref = "2.3----y.1">)
reference[0] = "2.3----y.1";
ReportParts objReportParts = wiDoc.getReportParts(reference,OutputFormatType.PDF);
ReportPart objReportPart = objReportParts.getItem(0);
//To find unique reference, you should get the ReportPart using temporary reference and find out unique reference associated to it.
String uniqueRef = objReportPart.getUniqueReference();
BinaryView myBOView = (BinaryView) objReportParts.getView();
OutputStream outputStream = response.getOutputStream();
response.setContentType("application/pdf");
response.setHeader("Content-Type","application/pdf");
response.setDateHeader("expires", 0);
// Output the binary stream via the response object
myBOView.getContent(outputStream);

Since:
11.7

Method Summary
 int getCount()
          Retrieves the count of report parts in the collection.
 ReportPart getItem(int index)
          Retrieves a ReportPart from the collection using its index.
 ReportPart getItem(java.lang.String reference)
          Retrieves a ReportPart from the collection using its reference.
 java.lang.Object getView()
          Retrieves the view of report part.
 

Method Detail

getCount

int getCount()
Retrieves the count of report parts in the collection.

Returns:
The count of report parts in the collection.

getItem

ReportPart getItem(int index)
Retrieves a ReportPart from the collection using its index.

Parameters:
index - The index of the report part in the collection.
Returns:
The requested ReportPart.
Throws:
java.lang.IndexOutOfBoundsException - if the index is out of range.

getItem

ReportPart getItem(java.lang.String reference)
Retrieves a ReportPart from the collection using its reference.

Parameters:
reference - The reference identifying the report part, be it temporary or unique.
Returns:
The requested ReportPart.
Throws:
java.lang.IllegalArgumentException - if the passed reference is illegal.

getView

java.lang.Object getView()
Retrieves the view of report part.

Returns:
The report parts output, in the format specified when calling DocumentInstance.getReportParts or DocumentInstance.getXmlReportParts.