fixing bugs and add new templates to datatable sorting report.