NSOA.report.list()
Use this function to read the list of reports published using the Business Intelligence Connector feature. The list contains the same data as the “list” report available in your business intelligence tool.
For more information, see Business Intelligence Connector. See also NSOA.listview.list() to read the list of published list views.
The Business Intelligence Connector feature must be enabled for your account to use NSOA.listview and NSOA.report functions. The Business Intelligence Connector feature is a licensed add-on. To enable this feature, contact your OpenAir account manager.
For more information about publishing list views and reports to the OpenAir OData service, see Business Intelligence Connector.
Parameters
N/A
Returns
-
The list of published reports. Each item in the list has the following properties:
-
ID
— The report ID -
Name
— The name of the report -
Rows
— The number of rows of data in the report -
PublishType
— The scope of use specified for the published report. -
Last published
— The date the report was last publishedImportant:The
Last published
property will beLast_published
with an underscore instead of the space if the optional feature Replace Non-Alphanumeric Characters with Underscores in Column Titles and Metadata is enabled for your account. Accommodate both possibilities in your scripts to ensure your scripts continue work whether the feature is enabled or not.
-
Units Limit
-
1 unit
Since
-
October 13, 2018
Example
// get the list of published reports
var reports = NSOA.report.list();
// each item in the list has following properties
// * 'ID'
// * 'Name'
// * 'Rows'
// * 'Last published'
// loop through all published reports and find given report ID
var i;
var reportId=0;
for (i = 0; i < reports.length; i++) {
if (reports[i].Name === 'My Approved Bookings') {
reportId = reports[i].ID;
break;
}
}
// if report ID was found get its data
if (reportId > 0) {
var rows = NSOA.report.data(reportId);
// process all report rows
}