i try to change the sort order of a report called via analytics rest api. For grouped reports there are sortOrder attributes in the grouping section, but i have to call a tabular report. If i call the report description there is no sort... attribute at all although the report is sorted by the column account name. How can i set a sort order for a specific column of the tabular report in the report metadata or ajax call?

Here my code:

// set filter
    jsonData.reportMetadata.reportFilters.push({'value':'2014-03-19T00:00:00Z','operator':'greaterThan',column:'LAST_UPDATE'}); // set filter on LastUpdateDate with time
    jsonData.reportMetadata.reportFilters.push({'value':'1105','operator':'greaterThan',column:'ACCOUNT.NAME'}); // set filter on account name

// call report
          var jsonData2 = JSON.parse($.ajax({
                dataType: 'json',
                data: JSON.stringify(jsonData),
                contentType: "application/json; charset=utf-8",
                beforeSend: function(xhr) {xhr.setRequestHeader('Authorization', 'Bearer {!$Api.Session_ID}');},
                async: false

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.