1

isue executing report

Тема: isue executing report

HI.
i have a isue when I try execute a report, The excution works fine but the measure unit not change.

For examlpe in the next request I put the mesuare unit with value 1, this value is for measure of USA (mi,gal) but my response show this in km,liters.

I will be very happy that you can tell me if I am doing something wrong.

Request report
[{"svc":"report\/exec_report","params":{"reportResourceId":14622130,"reportTemplateId":0,"reportObjectId":1233084,"reportObjectSecId":0,"interval":{"flags":16777216,"from":1495778400,"to":1496123999},"reportTemplate":{"n":"unidad","ct":"avl_unit","p":"{\"bind\":{\"avl_unit\":[\"1233084\"]},\"us_unit\":3}","tbl":[{"l":"Estadedsticas","c":"","n":"unit_stats","cl":"","sl":"","s":"","f":0,"sch":{"y":0,"m":0,"w":0,"f1":0,"f2":0,"t1":0,"t2":0},"p":"{\"us_units\":1}"},{"l":"Horas de motor","c":"[\"duration\",\"mileage\"]","n":"unit_engine_hours","cl":"[\"Horas de motor\",\"Kilometraje\"]","sl":"","s":"","f":0,"sch":{"y":0,"m":0,"w":0,"f1":0,"f2":0,"t1":0,"t2":0},"p":"{\"grouping\":\"{\\\"type\\\":\\\"day\\\",\\\"nested\\\":{\\\"type\\\":\\\"duration\\\"}}\",\"duration_format\":\"2\"}"}]}},"flags":1}]

Request table
[{"svc":"report\/select_result_rows","params":{"tableIndex":0,"config":{"type":"range","data":{"from":0,"to":65535,"level":1}}}}]


Request clean
[{"svc":"report\/cleanup_result","params":{}}]

Response report
[{"reportResult":{"msgsRendered":0,"stats":[],"tables":[{"name":"unit_engine_hours","label":"Horas de motor","grouping":{"nested":{"type":"duration"},"type":"day"},"flags":16777344,"rows":2,"level":2,"columns":3,"header":["Grouping","Horas de motor","Kilometraje"],"header_type":["","duration","mileage"]}],"attachments":[]}}]

Response table
[[{"n":0,"i1":3,"i2":1066,"t1":1495818498,"t2":1495848944,"d":5,"c":["2017-05-26","7.02","269 km"],"r":[{"n":0,"i1":3,"i2":5,"t1":1495818498,"t2":1495818527,"d":0,"c":["0:00:29","0.00","0.00 km"]},{"n":1,"i1":6,"i2":28,"t1":1495821160,"t2":1495821921,"d":0,"c":["0:12:41","0.21","2.60 km"]},{"n":2,"i1":496,"i2":743,"t1":1495832226,"t2":1495838166,"d":0,"c":["1:39:00","1.65","67 km"]},{"n":3,"i1":745,"i2":1066,"t1":1495839749,"t2":1495848944,"d":0,"c":["2:33:15","2.55","100 km"]},{"n":4,"i1":29,"i2":494,"t1":1495822032,"t2":1495831412,"d":0,"c":["2:36:20","2.60","99 km"]}]},{"n":1,"i1":1067,"i2":1098,"t1":1495849018,"t2":1495907207,"d":3,"c":["2017-05-27","0.19","0.70 km"],"r":[{"n":0,"i1":1096,"i2":1098,"t1":1495907137,"t2":1495907207,"d":0,"c":["0:01:10","0.01","0.00 km"]},{"n":1,"i1":1081,"i2":1089,"t1":1495849781,"t2":1495850022,"d":0,"c":["0:04:01","0.06","0.40 km"]},{"n":2,"i1":1067,"i2":1080,"t1":1495849018,"t2":1495849422,"d":0,"c":["0:06:44","0.11","0.30 km"]}]}]]

Response clean
[{"error":0}]

2

isue executing report

Re: isue executing report

cerpas, hello.
You also need to add "us_units" option to "s" parameter in such format: "s":"[\"precise_calculations\",\"address_format\",\"time_format\",\"us_units\"]".

Head of Wialon Local Department
Gurtam
3

isue executing report

Re: isue executing report

Works fine.
Thank you so much.

4

isue executing report

Re: isue executing report

i have the same problems i execute the report and it brings me emty array of results in Tables, Attachments and all i send the request to the server in this way in PHP
$speedParams=array ("reportResourceId"=>12947955,
                   "reportTemplateId"=>63,
                   "reportObjectId"=>15652870,
                   "reportObjectSecId"=>0,
                   "interval"=>array(
                           "from"=>1499148000,
                           "to"=>1499320740,
                           "flags"=>0 //0x00
                   ),
                   "tzOffset"=>-21600,
                   "lang"=>"en");

i execute the comand

$arregloReporteSPEED = $wialon_api->report_exec_report(json_encode($speedParams)."&sid=".$sid."");

and the response that i get from the gurtam server is:

{"reportResult":{"msgsRendered":0,"stats":[],"tables":[{"name":"unit_group_speedings","label":"Excesos de velocidad","grouping":{"type":"unit"},"flags":4352,"rows":22,"level":2,"columns":7,"header":["№","Grouping","Comienzo","Localización","Límite de velocidad","Velocidad máxima","Duración"],"header_type":["","","time_begin","location_begin","speed_limit","max_speed","duration"]}],"attachments":[]},"reportLayer":{"name":"report markers","bounds":[0,0,0,0]},"layerCount":1}

with the msgsRendered in 0 and as you see, the array empty, Any ideas of what could be happening or what i'm doing wrong ?
I would be very grateful to get some help.
THANKS

5

isue executing report

Re: isue executing report

i am facing same issue

6

isue executing report

Re: isue executing report

Check this topic https://forum.gurtam.com/viewtopic.php? … 97#p136397