Server side full export of pdf and excel using tabletools

Server side full export of pdf and excel using tabletools

drakula1234drakula1234 Posts: 58Questions: 1Answers: 0
edited November 2012 in General
Allan,

This plugin is wonderful, I really appreciate your help in my previous posts to get the plugin working on client side. I have another question to get this to export full dataset from serverside. I have the plugin download (GET only) in my code. Can I use the sUrl same as the sAjaxSource or will that be different. My controller that is triggered for the sAjaxSource spits out the application/json as the MIME type. Can I use the same controller or should that be a different controller with the MIME type attachment. Also, how to pass the serverside processing parameters.

Replies

  • allanallan Posts: 63,089Questions: 1Answers: 10,387 Site admin
    You might be interested in the download plug-ins here: http://datatables.net/extras/tabletools/plug-ins .

    To be honest I don't see the point of using TableTools for client-side export with server-side processing, since you might as well just switch to client-side processing. It will be much easier and you need to load the full data set anyway.

    Allan
  • drakula1234drakula1234 Posts: 58Questions: 1Answers: 0
    I have used clientside for a smaller dataset and it works perfect. There is another datatable with a huge dataset collecting data from multiple databases which takes significant amount of time to load for 25 records, I can't do the client side for this but I want to export full records server-side. I have the plugin http://datatables.net/extras/tabletools/plug-ins in my code. What are the other requirements I need to achieve this functionality ? Should I use apache-fop to do the pdf rendering and apache poi for excel export or I am very confused with this.
  • allanallan Posts: 63,089Questions: 1Answers: 10,387 Site admin
    > What are the other requirements I need to achieve this functionality ?

    You need to write the script that will create the file and then download it :-). I don't actually have an example of that, but there are plenty around the web, and plenty of libraries to help create such files, such as the ones you suggest.

    Allan
  • drakula1234drakula1234 Posts: 58Questions: 1Answers: 0
    Thank you very much Allan
  • drakula1234drakula1234 Posts: 58Questions: 1Answers: 0
    Allan, I have another question. For the full export I need to send iDisplayStart and iDisplayLength values to my server to retrieve the complete resultset. I am not sure how to pass those values to my serverside code in download (POST + GET) code. I was assuming we can pass iDisplayStart and iDisplayLength values in aoGet/aoPost but doesn't seem to work. Can you please tell me how to send those values so that my existing code will work asusual. Thanks!
  • allanallan Posts: 63,089Questions: 1Answers: 10,387 Site admin
    The two download plug-ins should be sending the full parameter set as GET or POST parameters (depending on which one you use). If that doesn't work, please link to a test case showing the problem.

    Allan
This discussion has been closed.