A function which collates data from various API calls. Help on design-pattern Help on the appropriate design pattern for this.  

Program details:  


  A scheduled script that fetches all the data from various framework-based API's - executeSearch('webservice_name') - ,
  then, collate the data and pass it to another framework-API - saveToReportTemplate('report_template_name') -
  which persists the collated data to the database.


var Report = Report || {};

(function (R) {

    var _data1 = 0,
        _data2 = 0,
        _data3 = 0,
        _data4 = 0;

    function initData() {
        _data1 = 0;
        _data2 = 0;
        _data3 = 0;
        _data4 = 0;
    }

    function fetchData1() {
        //executeSearch is a framework API
        var result = executeSearch('transactions');

        _data1 = result.getValue('transactions.done');
    }

    function fetchData2() {
        //executeSearch is a framework API
        var result = executeSearch('company');

        _data2 = result.getValue('company.investors');
    }

    function fetchData3and4() {
        //executeSearch is a framework API
        var result = executeSearch('employee');
        _data3 =  result.getValue('employee.name');
        _data4 =  result.getValue('employee.salary');
    }

    function populateReport() {
        //framework API
        saveToReportTemplate('some_report_template', _data1, _data2, _data3, _data4);
    }

    R.generateReport = function () {
        initData();
        fetchData1();
        fetchData2();
        fetchData3and4();
    };

})(Report);

//usage
R.generateReport();


Need help/advice/criticisms on:  


overall structure of the program
my usage of private variables and functions
usage of javascript's closure
is there anything I can improve?
any good design patterns for solving this kind of problem?


Note: 
There is no way we can implement a new database table/view for this, because we are just interacting on external APIs.
Also, there is no SQL-based method provided for us to solve such problems.
Well, based on what I can get, here's some code that should work. Note that I use native Promises which is ES6 technology. It's handy, but I don't want to have jQuery tagging along. Use a polyfill for older browsers.

;(function(ns) {

  ns.generateReport = function(template, executionList) {

    // Because the operations can be async, we use promises instead. This allows
    // us to dictate when and what in the operation we resolve as a value.
    var promises = executionList.map(function(item) {
      return new Promise(function(resolve, reject) {

        //Assuming that everything is synchronous, the code most likely looks like this
        var result = search(item.search);
        var data = item.save.map(function(saveItem) {
          result.getValue(saveItem);
        });
        resolve(data);

        //If the operations are aync, then most likely it will look like
        search(item.search, function(result) {
          var data = item.save.map(function(saveItem) {
            result.getValue(saveItem);
          });
          resolve(data);
        });

      });
    });

    // We listen for all of the promises to resolve. When they do, the callback is
    // called with an array of resolved values from the promises we just mapped. They
    // will look like [[1],[2],[3,4]]
    Promises.all(promises).then(function(values) {

      // We concatenate the arrays inside the array using apply and concat. They'll
      // end up like [1,2,3,4]
      var params = Array.prototype.concat.apply([], values);

      // Add in the report template parameter so it'll look like ['template',1,2,3,4]
      params.unshift(template);
      saveToReportTemplate.apply(null, data);
    });

  }

// Uses an existing R or creates one
}(this.R = this.R || {}));

// Sample usage is this.
R.generateReport('report_template', [{
  search: 'transactions',
  save: ['transactions.done']
}, {
  search: 'company',
  save: ['transactions.done']
}, {
  search: 'company.investors',
  save: ['employee.name', 'employee.salary']
}]);