var proxyData = proxy.data('ejReportViewer');
If I remove my required header from the API and not override the doAjaxPost the report works fine and calls PostReportAction 6 times total. I've got the doAjaxPost within an angular controller if that matters.
<div style="height: 650px;width: 950px;min-height:404px;" id="viewer"></div>
<script type="text/javascript">
$(function () {
$("#viewer").ejReportViewer({
reportServiceUrl: "http://flexadmin.local-aon.com/api/Flex/APIReports",
processingMode: ej.ReportViewer.ProcessingMode.Remote,
reportLoaded: "onReportLoaded"
});
})
</script>
ej.ReportViewer.prototype.doAjaxPost = function (type, url, jsondata, onSuccess) {
var proxy = $('#viewer')
var proxyData = proxy.data('ejReportViewer');
var inVokemethod = onSuccess;
$.ajax({
type: type,
url: url,
crossDomain: true,
contentType: 'application/json; charset=utf-8',
dataType: 'json',
data: jsondata,
beforeSend: function (req) {
if (inVokemethod == "_getPageModel" || inVokemethod == "_getPreviewModel") {
if (!proxyData._isToolbarClick) {
proxyData._showloadingIndicator(true);
} else {
proxyData._showNavigationIndicator(true);
}
}
req.setRequestHeader('ejAuthenticationToken', proxyData._authenticationToken);
req.setRequestHeader('__RequestVerificationToken', vToken);
},
success: function (data) {
if (data && typeof (data.Data) != "undefined") {
data = data.Data;
}
if (typeof (data) == "string") {
if (data.indexOf("Sf_Exception") != -1) {
proxyData._renderExcpetion(inVokemethod + ":" + data);
return;
}
}
proxyData[inVokemethod](data);
},
});
}