Help with copy_csv_xls_pdf.swf

Help with copy_csv_xls_pdf.swf

dhyaneshdhyanesh Posts: 30Questions: 8Answers: 0

Hello,

I am trying to add copy_csv_xls_pdf to my table but not seeing it activated on the output. Below is how I am initializing my tables:

$(document).ready(function() { $('#dataTables-example').dataTable( { "dom": 'T<"clear">lfrtip', "tableTools": { "sSwfPath": "/scripts/copy_csv_xls_pdf.swf" }, "processing": true, "serverSide": true, "order": [[ 0, "desc" ]], "ajax": "/scripts/server_processing_sample.php" }); });

Sample report is located at http://core.nyota.co.tz/rpt-sample.php

Your help will be highly appreciated.

Thank you.

Dhyanesh

Answers

  • dhyaneshdhyanesh Posts: 30Questions: 8Answers: 0

    Hello,

    I managed to get the copy_csv_xls_pdf working. Need help to on how can I copy/save/print all records instead of only the records that are displayed on the screen. Below is how I am initializing it:

    <

    script>
    $(document).ready(function() {
    $('#dataTables-example').dataTable( {
    "processing": true,
    "serverSide": true,
    "order": [[ 0, "desc" ]],
    "ajax": "/scripts/server_processing_sample.php",

            "dom": 'T<"clear">lfrtip',
            "tableTools": {
                "sSwfPath": "/scripts/copy_csv_xls_pdf.swf",
    
                "aButtons": [
                "copy",
                "print",
                {
                    "sExtends":    "collection",
                    "sButtonText": "Save",
                    "aButtons":    ["csv", "xls", "pdf", "bShowAll": true]
                }
                ]
            }     
         });
    });
    

    Please advice where I am going wrong as print/save is only printing 10 records which are displayed on the page.

    Thank you.

    Dhyanesh

This discussion has been closed.