Exporting a Report as Pages

Exports in paginated mode to various formats a report of a Web Intelligence document.

Note The first page of a Web Intelligence document begins at 0. The 404 error message is returned after retrieving the last report page.
Format can be:
  • XML
  • PDF
  • MS Excel 2003
  • MS Excel 2007
Request

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

Where:
  • {documentId} is the document identifier retrieved from the list of documents
  • {reportId} is the report identifier retrieved from the list of reports
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

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
orientation

Page orientation. Use 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.

If mode=normal
Response
Response type:
  • 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 -G -s -H "accept:text/xml" -H X-SAP-LogonToken:"""<tokenValue>"""
 "<webiURL>/documents/9227/reports/1/pages" > xmlreport.xml

Example

PDF
curl -G -s -H "accept:application/pdf" -H X-SAP-LogonToken:"""<tokenValue>"""
 "<webiURL>/documents/9227/reports/1/pages?mode=normal&widthScaling=1" > pdfreport.pdf

Example

MS Excel 2003
curl -G -s -H "accept:application/vnd.ms-excel" -H "X-SAP-LogonToken:""<tokenValue>"""
 "<webiURL>/documents/9227/reports/1/pages" > excel2003.xls

Example

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