DataTables warning: table id=txn-t - Ajax error.
DataTables warning: table id=txn-t - Ajax error.
Nasamuk3Abus
Posts: 1Questions: 1Answers: 0
In my datatable have more than 2 million record. when i try to get csv report it is getting error, if i gave iDisplayLength value as 10000, i got 10000 records in csv file. when i try to get more than 10000 records i am getting same error.
I am using Laravel 5
The error -
**DataTables warning: table id=txn-t - Ajax error. For more information about this error, please see http://datatables.net/tn/7**This is my ajax code
var oTable = $('#txn-t').DataTable({
dom: 'Bfrtip',
buttons: [
// 'copyHtml5',
// 'excelHtml5',
// 'csvHtml5'
{
extend: 'copyHtml5',
title: 'Report'+todayDate+curTime+$curncy
},
{
extend: 'excelHtml5',
title: 'Report'+todayDate+curTime+$curncy
},
{
extend: 'csvHtml5',
title: 'Report'+todayDate+curTime+$curncy
}
],
initComplete: function() {
$('.buttons-csv').click();
},
processing: true,
serverSide: true,
searching: false,
iDisplayLength: -1,
ajax: {
url: '{!! route('report.data') !!}',
data: function (d) {
d.bank = $('select[name=bank]').val();
}
},
columns: [
{data: 'tx_id', name: 'tx_id'}
]});
This discussion has been closed.
Answers
Hi @Nasamuk3Abus ,
Did you try the diagnostic suggestions on page linked to in the error ( https://datatables.net/manual/tech-notes/7 ). If you did, and no success, we're happy to take a look, but it would help, as per the forum rules, if you could link to a running test case showing the issue so we can offer some help. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin