desinger.onSaveReport post json raise error
Posted: Mon Nov 16, 2015 1:51 pm
onSaveReport event
//ajax post report file to server and save,
function test(e) {
var data = { "id": e.report.reportName, "fn": e.report.saveToJsonString() };
$.ajax({
url: "/Report/SaveReport.ashx",
dataType: 'json',
async: false,
type: 'get',
data: data,
complete: function (msg) {
},
success: function (data) {
alert("success");
},
error: function (a, b, c) {
alert(a.responseText);
}
});
}
//event
var options = new Stimulsoft.Designer.StiDesignerOptions();
options.appearance.fullScreenMode = true;
var designer = new Stimulsoft.Designer.StiDesigner(options, "StiDesigner", false);
designer.onSaveReport = function (e) {
test(e);
};
//when run test(e) method designer show an error
test@http://localhost:60468/BaseUI/ClsReport.js:33:9 ClsReport/this.designReport/designer.onSaveReport@http://localhost:60468/BaseUI/ClsReport.js:60:13 o
ClsReport is the class to opt Report
the method test(e) call by button click event success
//ajax post report file to server and save,
function test(e) {
var data = { "id": e.report.reportName, "fn": e.report.saveToJsonString() };
$.ajax({
url: "/Report/SaveReport.ashx",
dataType: 'json',
async: false,
type: 'get',
data: data,
complete: function (msg) {
},
success: function (data) {
alert("success");
},
error: function (a, b, c) {
alert(a.responseText);
}
});
}
//event
var options = new Stimulsoft.Designer.StiDesignerOptions();
options.appearance.fullScreenMode = true;
var designer = new Stimulsoft.Designer.StiDesigner(options, "StiDesigner", false);
designer.onSaveReport = function (e) {
test(e);
};
//when run test(e) method designer show an error
test@http://localhost:60468/BaseUI/ClsReport.js:33:9 ClsReport/this.designReport/designer.onSaveReport@http://localhost:60468/BaseUI/ClsReport.js:60:13 o
ClsReport is the class to opt Report
the method test(e) call by button click event success