export_result

The export_result method is used to export report results to a file.

Copied!
svc=report/export_result&params={
  "format": <uint>,
  "pageOrientation": "<text>",
  "hideGoogleLinks": <uint>,
  "pageSize": "<text>",
  "pageWidth": "<text>",
  "coding": "<text>",
  "delimiter": "<text>",
  "headings": "<text>",
  "compress": "<text>",
  "attachMap": "<text>",
  "extendBounds": <bool>,
  "hideMapBasis": "<text>",
  "outputFileName": "<text>",
  "splitChart": "<text>",
  "appendTreeAnchorRows": "<text>"
}

Parameters

Name Description
format File format bitmask (see the list below). To export multiple formats at once, add their values (for example, 2 + 4 = 6 for PDF + XLS). In that case, the output is automatically packed into a ZIP archive.

Optional parameters:

Name Description Default value
compress Report file compression:
  • 0 — no;
  • 1 — yes. Forced to 1 when the export produces more than one file.
1
pageOrientation Page orientation (PDF): portrait, landscap. portrait
pageSize Page format (PDF): a4, a3, letter, legal. a4
pageWidth Page width (PDF):
  • 0 — fixed;
  • 1 — compact;
  • 2 — no-wrap.
0
coding Encoding (CSV): utf8, cp1251. utf8
delimiter Delimiter (CSV). Possible values: semicolon (applies ;), colon (applies ,). To use a comma as a delimiter, set the value to colon or leave it empty ("delimiter":""). colon
headings Displaying headers:
  • 0 — no;
  • 1 — yes.
0
attachMap Attaching the map (PDF and HTML only):
  • 0 — no;
  • 1 — yes.
0
extendBounds Extend the map to include geofences:
  • 0 — no;
  • 1 — yes.
0
hideMapBasis Hiding the map layer:
  • 0 — no;
  • 1 — yes.
0
outputFileName File name. Online_report
hideGoogleLinks Hide google links in coordinate cells (PDF and XLSX):
  • 0 — no;
  • 1 — yes.
0
splitChart Splitting by day or week. <empty>
appendTreeAnchorRows Append tree anchor rows with an empty row:
  • 0 — no;
  • 1 — yes.
0

According to the logic for the extendBounds parameter, by default the map is zoomed to fit the tracks, markers, and icons. When the option is enabled, the map is also zoomed to fit the geofences. If there are no graphic elements (neither tracks, markers, icons for the default situation, nor geofences for the activated extendBounds option), the map isn’t displayed at all.

File format values (bitmask):

  • 1 — HTML;
  • 2 — PDF;
  • 4 — XLS;
  • 8 — XLSX;
  • 16 — XML;
  • 32 — CSV.

Returned result

Returns a file of demanded format.

Possible error codes

Code Description
4 Wrong input parameters.
5 Report file reading/writing error.
6 Failed to fetch the user.

If you find a mistake in the text, please select it and press Ctrl+Enter.

Report a mistake

Your message was sent. Thank you!

An error occurred while submitting the form