使用jquery ajax json在grapecity活动报告中的pdf下载错误
这是我的代码。当我尝试下载pdf报告时,我收到以下错误。
任何人都请帮助我。谢谢提前
代码:
$。 ajax({
类型:POST,
contentType:application / json; charset = utf-8,>
url:ServiceUri +LoadOnTimeReport,
data:'{LocationId:'+ $(#cmbLocation option:selected)。val()+', Location:'+ $(#cmbLocation option:selected)。text()+',statuschangeddatefrom:'+ $(#txtStatusChangeFromDate)。val()+',statuschangedateto :'+ $(#txtStatusChangeToDate)。val()+',exportType:'+ exportType +'}',
dataType:json,>
成功:函数(数据){
$(#lblMessage)。empty();
},
错误:函数(xhr,状态,错误){
alert(xhr.responseText);
}
});
错误:
Hi,
This is my code. when i try to download pdf report i am getting the following error.
Anyone please help me.Thanks in advance
code:
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: ServiceUri + "LoadOnTimeReport",
data: '{"LocationId":"' + $("#cmbLocation option:selected").val() + '","Location":"' + $("#cmbLocation option:selected").text() + '","statuschangeddatefrom":"' + $("#txtStatusChangeFromDate").val() + '","statuschangedateto":"' + $("#txtStatusChangeToDate").val() + '","exportType":"' + exportType + '"}',
dataType: "json",
success: function (data) {
$("#lblMessage").empty();
},
error: function (xhr, status, error) {
alert(xhr.responseText);
}
});
error:
%PDF-1.3
%??
1 0 obj
<<
/Type /Outlines
/Count 0
>>
endobj
2 0 obj
[/PDF /Text /ImageC]
endobj
3 0 obj
<<
/Type /Pages
/Count 1
/Kids [10 0 R ]
>>
endobj
4 0 obj
<<
/Type /Font
/Subtype /TrueType
/Name /F1
/BaseFont /Arial,Bold
/FirstChar 32
/LastChar 255
/Widths [
.ajax({
类型:POST,
contentType:application / json; charset = utf-8,
url:ServiceUri +LoadOnTimeReport,
data:'{LocationId:'+
.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: ServiceUri + "LoadOnTimeReport",
data: '{"LocationId":"' +
(#cmbLocation option:selected)。val()+',Location:'+
("#cmbLocation option:selected").val() + '","Location":"' +
(#cmbLocation option:selected)。text()+ ',statuschangeddatefrom:'+
("#cmbLocation option:selected").text() + '","statuschangeddatefrom":"' +