Topic: How to create downloadable report
Hi,
I use the example from here http://sdk.wialon.com/playground/index. … ute_report
to create report and I am able to display it as html.
var sess = wialon.core.Session.getInstance(); // get instance of current Session
var res = sess.getItem(id_res); // get resource by id
var to = time_to; // get current server time (end time of report time interval)
var from = time_from;//to - parseInt($("#interval").val(), 10); // calculate start time of report
// specify time interval object
var interval = {"from": from, "to": to, "flags": wialon.item.MReport.intervalFlag.absolute};
var template = res.getReport(id_templ); // get report template by id
res.execReport(template, id_unit, 0, interval, // execute selected report
function (code,data) { /*generate html */...});
}
Which are the object and methods of wialon for creating downloadable reports.