Showing all entries produce error
Showing all entries produce error
Hi there,
i have a table with over 8.000 entries (until now, data will rise in future). In some cases i have to export all of them to Excel, therefor i set the lengthMenu to:
"lengthMenu": [[10, 25, 50, 250, -1], [10, 25, 50, 250, "All"]],
It works fine until i use the "All" statement. With "All" i get the following error:
Unable to get property 'length' of undefined or null reference
Can anybody help me? Normally it makes no sense to show all 8.000 entries on the webpage, but i have to export them all to Excel. Perhaps someone knows a better way.
This question has an accepted answers - jump to answer
Answers
I would start by looking at the returned data. The steps in this technote will get you started.
A better option may be to look for a server side script to generate the Excel files.
Kevin
I'm sorry but there are no returned datas. I checked the Ajax and the Ajax finished normally. It seems that there too many datas, so that datatable will run out of time or out of memory.
I think the best solution will be, that i do not use the datatable function to export to Excel. I will do the export outside of datatables.
Sounds like you might need to increase the memory available to the server if you want it to output all 8000 records at once. Or perhaps change whatever code you are using to get the data one row at a time and output it that way.
Allan