{"action":"created","issue":{"url":"https://api.github.com/repos/vitalidze/traccar-web/issues/550","repository_url":"https://api.github.com/repos/vitalidze/traccar-web","labels_url":"https://api.github.com/repos/vitalidze/traccar-web/issues/550/labels{/name}","comments_url":"https://api.github.com/repos/vitalidze/traccar-web/issues/550/comments","events_url":"https://api.github.com/repos/vitalidze/traccar-web/issues/550/events","html_url":"https://github.com/vitalidze/traccar-web/issues/550","id":138192364,"number":550,"title":"Question - Create new type of report that show fuel comsumption","user":{"login":"thaihau","id":851803,"avatar_url":"https://avatars.githubusercontent.com/u/851803?v=3","gravatar_id":"","url":"https://api.github.com/users/thaihau","html_url":"https://github.com/thaihau","followers_url":"https://api.github.com/users/thaihau/followers","following_url":"https://api.github.com/users/thaihau/following{/other_user}","gists_url":"https://api.github.com/users/thaihau/gists{/gist_id}","starred_url":"https://api.github.com/users/thaihau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaihau/subscriptions","organizations_url":"https://api.github.com/users/thaihau/orgs","repos_url":"https://api.github.com/users/thaihau/repos","events_url":"https://api.github.com/users/thaihau/events{/privacy}","received_events_url":"https://api.github.com/users/thaihau/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-03T14:27:53Z","updated_at":"2016-03-03T20:59:03Z","closed_at":null,"body":"I want to to create new report for fuel consumption report. Current traccar server store the fuel data in 'other' column in json object. The sample data is \r\n`\r\n{status\":\"18004000\"\tbattery:4.1\tpower:12.0\tadc1:\"0432\"\tlac:32205\tcid:0\tsat:11\tgsm:9\thdop:0.7\todometer:0\tip:\"183.171.17.54\"}\"`\r\n\r\nCan you hint/guide me how to create new type of report?"},"comment":{"url":"https://api.github.com/repos/vitalidze/traccar-web/issues/comments/191960133","html_url":"https://github.com/vitalidze/traccar-web/issues/550#issuecomment-191960133","issue_url":"https://api.github.com/repos/vitalidze/traccar-web/issues/550","id":191960133,"user":{"login":"vitalidze","id":2294325,"avatar_url":"https://avatars.githubusercontent.com/u/2294325?v=3","gravatar_id":"","url":"https://api.github.com/users/vitalidze","html_url":"https://github.com/vitalidze","followers_url":"https://api.github.com/users/vitalidze/followers","following_url":"https://api.github.com/users/vitalidze/following{/other_user}","gists_url":"https://api.github.com/users/vitalidze/gists{/gist_id}","starred_url":"https://api.github.com/users/vitalidze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitalidze/subscriptions","organizations_url":"https://api.github.com/users/vitalidze/orgs","repos_url":"https://api.github.com/users/vitalidze/repos","events_url":"https://api.github.com/users/vitalidze/events{/privacy}","received_events_url":"https://api.github.com/users/vitalidze/received_events","type":"User","site_admin":false},"created_at":"2016-03-03T20:59:03Z","updated_at":"2016-03-03T20:59:03Z","body":"You need to:\r\n\r\n* define new report type in `ReportType` enum\r\n* write report generator class, derived from `ReportGenerator`. It must contain all your data processing and result rendering logic\r\n* assign report generator to the report type in `ReportsModule` class\r\n\r\nI suggest to observe existing reports. In particular changes from this commit add the `Events` report: https://github.com/vitalidze/traccar-web/commit/ad4ef1747797fc35ed81db7aa0a7d038083ac520 "}}