Тема: Error 4 with unit_stat table in report template
Hello, I have this batch request that responds me with error 4, But if I remove the unit_stats table the request works fine.
I can not understand what's wrong, Maybe you can help me. i'm work with remote API (PHP).
-----------------------------------------------------------------> request with stats table<------------------------------------------------------------------------
[{"svc":"unit\/get_drive_rank_settings","params":{"itemId":1233125}},{"svc":"report\/exec_report","params":{"reportResourceId":11982,"reportTemplateId":0,"reportObjectId":1233125,"reportObjectSecId":0,"interval":{"flags":16777216,"from":1490680800,"to":1490767199},"reportTemplate":{"n":"Eco Drive","ct":"avl_unit","p":"{\"bind\":null}","tbl":[{"n":"unit_stats","l":"Statistics","f":0,"c":"","cl":"","p":"{\"address_format\":\"0\",\"time_format\":\"%Y-%m-%E_%H:%M:%S\",\"us_units\":0}","sch":{"y":0,"m":0,"w":0,"f1":0,"f2":0,"t1":0,"t2":0},"sl":"","s":"[\"multi_drivers\",\"precise_calculations\",\"address_format\",\"time_format\",\"us_units\"]"},{"n":"unit_ecodriving","l":"Eco Drive","f":0,"c":"[\"violations_count\",\"driver\",\"time_begin\"]","cl":"[\"Count\",\"Driver\",\"begin\"]","sl":"","s":"","p":"{\"grouping\":\"{\\\"type\\\":\\\"day\\\",\\\"nested\\\":{\\\"type\\\":\\\"criterion\\\"}}\"}","sch":{"y":0,"m":0,"w":0,"f1":0,"f2":0,"t1":0,"t2":0}},{"n":"unit_trips","l":"Distance","f":0,"c":"[\"mileage\",\"time_begin\"]","cl":"[\"Distance\",\"begin\"]","sl":"","s":"","p":"{\"grouping\":\"{\\\"type\\\":\\\"day\\\"}\",\"fillings_params\":\"\",\"thefts_params\":\"\",\"sensor_params\":\"\"}","sch":{"y":0,"m":0,"w":0,"f1":0,"f2":0,"t1":0,"t2":0}}]}}},{"svc":"report\/select_result_rows","params":{"tableIndex":0,"config":{"type":"range","data":{"from":0,"to":65535,"level":1,"rawvalues":1}}}},{"svc":"report\/select_result_rows","params":{"tableIndex":1,"config":{"type":"range","data":{"from":0,"to":65535,"level":1,"rawvalues":1}}}},{"svc":"report\/cleanup_result","params":{}}]
------------------------------------------------------------------> request without stats table<---------------------------------------------------------------------
[{"svc":"unit\/get_drive_rank_settings","params":{"itemId":1233125}},{"svc":"report\/exec_report","params":{"reportResourceId":11982,"reportTemplateId":0,"reportObjectId":1233125,"reportObjectSecId":0,"interval":{"flags":16777216,"from":1490680800,"to":1490767199},"reportTemplate":{"n":"Eco Drive","ct":"avl_unit","p":"{\"bind\":null}","tbl":[{"n":"unit_ecodriving","l":"Eco Drive","f":0,"c":"[\"violations_count\",\"driver\",\"time_begin\"]","cl":"[\"Count\",\"Driver\",\"begin\"]","sl":"","s":"","p":"{\"grouping\":\"{\\\"type\\\":\\\"day\\\",\\\"nested\\\":{\\\"type\\\":\\\"criterion\\\"}}\"}","sch":{"y":0,"m":0,"w":0,"f1":0,"f2":0,"t1":0,"t2":0}},{"n":"unit_trips","l":"Distance","f":0,"c":"[\"mileage\",\"time_begin\"]","cl":"[\"Distance\",\"begin\"]","sl":"","s":"","p":"{\"grouping\":\"{\\\"type\\\":\\\"day\\\"}\",\"fillings_params\":\"\",\"thefts_params\":\"\",\"sensor_params\":\"\"}","sch":{"y":0,"m":0,"w":0,"f1":0,"f2":0,"t1":0,"t2":0}}]}}},{"svc":"report\/select_result_rows","params":{"tableIndex":0,"config":{"type":"range","data":{"from":0,"to":65535,"level":1,"rawvalues":1}}}},{"svc":"report\/select_result_rows","params":{"tableIndex":1,"config":{"type":"range","data":{"from":0,"to":65535,"level":1,"rawvalues":1}}}},{"svc":"report\/cleanup_result","params":{}}]