Skip to main content

Export Report Data

NodeJS Example File

ExportDataApiExample.js

Export Data method

Export via Report

Export data according to the selected report

REST APIExportDataApi/exportData
NodeJSexportDataRecords

ParametersDescriptionParameter Options/value
datafile from defined param(datafile) How to export report data
parameters from defined param (parameters)

Export Data OutputData

NameOptions
statusCode200 – OK / 500 - Errors
status
repdatareport data found by report
errorsOK / Error: Params not found or not match / Data not found / No Permission

JSON Example

{
"datafile": "0c61e292d66a713ad1b9638e43581ece4..................875fe620fc0a7fd079e7306764c2891c4c4c91e6f3c7cc338c8073",
"parameters": [
{
"p_name": "__MUSTACH_P0__",
"id": "1",
"type": "long",
"name": "קוד מיון",
"defVal": "-999999999",
"opName": "שווה",
"opOrigin": "from"
},
{
"p_name": "__MUSTACH_P1__",
"id": "2",
"type": "txt",
"name": "חתך",
"defVal": "'*****'",
"opName": "מכיל",
"opOrigin": "from"
}
]
}

How to export report data

  1. Go to the WizCloud Report Planner by selecting it in the menu:

Report Planner in Wizcloud menu

  1. Select and design a report with or without parameters.

  2. Issue the report by using the External option.

External report

The External option generates a text file that will be immediately downloaded to your desktop.

This file includes all data about the structure of the report and parameters (if they are included in the report design).

text file

The data in this file includes two parts:

  • datafile – a long encrypted string that refers to the report structure.
  • parameters - if the report was designed to be issued according to parameters, this part lists the parameters that you have to enter to properly export the data.

You can copy the data from this file to ExportDataApiExample.js (see JSON Example).
If your report does not include parameters, copy only the "datafile" part.

If you do use parameters you should update one property value only on each property object. The property "defVal" includes a default value for this property and this is the place to change it to the value that you want. All other properties should be modified according to their type. For example for report (below) having sort codes 100 - 399 you should change to "100" instead "-999999999" and 399 instead "999999999".

JSON Example with "client" changes

{
"datafile": "0c61e292d66a713ad1b9638e43581ece4..................875fe620fc0a7fd079e7306764c2891c4c4c91e6f3c7cc338c8073",
"parameters": [
{
"p_name": "__MUSTACH_P0__",
"id": "1",
"type": "long",
"name": "קוד מיון",
"defVal": "110",
"opName": "שווה",
"opOrigin": "from"
},
{
"p_name": "__MUSTACH_P1__",
"id": "2",
"type": "txt",
"name": "חתך",
"defVal": "'****1'",
"opName": "מכיל",
"opOrigin": "from"
}
]
}