Exporting a Page of a Report

Exports a report page to various formats.

The format can be:

  • HTML
  • ZIP (zipped HTML)
  • MHTML (multi-part HTML)
  • XML
  • PDF
  • MS Excel 2003
  • MS Excel 2007
Note If you choose the HTML format, the web service generates the image links. Therefore, the logon token must still be valid when the HTML output is displayed.
Request

GET <webiURL>/documents/{documentId}/reports/{reportId}/pages/{pageIndex}

Where:
  • {documentId} is the document identifier retrieved from the list of documents
  • {reportId} is the report identifier retrieved from the list of reports
  • {pageIndex}: The page number. It begins to 1 and while the number of report pages is not known in advance, you have to use this URL in a loop, which returns the 404 error message "Not Found" after the last found page.
Table 1: Optional Parameters
Parameter Description Supported Formats
dpi

Resolution in dots per inch (dpi) for generated charts. Value between 75 and 9600. Default is 300 for PDF format, 96 for all other formats.

All
mode

normal (default) or quickDisplay.

All
orientation

Page orientation. Used to force a specific page orientation. Values are portrait and landscape.

If mode=normal
widthScaling

Number of pages per report displaying in width. Default is 0 and means no constraint in width.

If mode=normal
heightScaling

Number of pages per report displaying in height. Default is 0 means no constraint in height.

Ifmode=normal
chartOutputFormat

Output format for generated chart. Values are: jpeg, bmp, gif, and png (default).

HTML, ZIP and MHTML

fileName

A string that defines the name of the ZIP file. If set, the HTML output is zipped to a fileName.zip file. Maximum string length is 96.

ZIP
unit

A string that defines the unit that sizes will be reported in. Values are "metric", "millimeter", "point", and "pixel" (default).

XML
optimized

Boolean. Default is false. If true, the generated output is optimized for calculations inside MS Excel..

MS Excel 2003 and MS Excel 2007

Response
Response type:
  • text/html
  • application/zip for zipped HTML
  • multi-part/related for MHTML
  • text/xml
  • application/pdf
  • application/vnd.ms-excel for MS Excel 2003
  • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet for MS Excel 2007

Response body: the report in the expected format.

Example

XML
curl -H "accept:text/xml" -H X-SAP-LogonToken:"""%tokenValue%"""
 "<webiURL>/documents/9646/reports/479/pages/0" > page1.xml

Example

PDF
curl -H "accept:application/pdf" -H X-SAP-LogonToken:"""<tokenValue>"""
 "<webiURL>/documents/9646/reports/479/pages/1" > page2.pdf

Example

MS Excel 2003
curl -H "accept:application/vnd.ms-excel" -H X-SAP-LogonToken:"""<tokenValue>"""
 "<webiURL>/documents/9646/reports/479/pages/2" > page3.xls

Example

MS Excel 2007
curl -G -s -H "accept:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -H X-SAP-LogonToken:"""<tokenValue>"""
 "<webiURL>/documents/9646/reports/479/pages/0" > page1.xlsx