1

How to create downloadable report

(01/12/2014 10:55:30 отредактировано mitko)

Тема: 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.

2

How to create downloadable report

Re: How to create downloadable report

Hi
Check getExportUrl function
More info about input parameters you can find on Remote API page

3

How to create downloadable report

Re: How to create downloadable report

Thanks, that helped