Save csv, excel & pdf

Save csv, excel & pdf

nokonoko Posts: 10Questions: 3Answers: 0

Hi Im trying to get the save button to work. The print button works fine but when I click on the save button all I see are the three options csv, excel & pdf and nothing happens, when I right click in it, it says movie not loaded. Any help ?

my code is
order: [ 1, 'desc' ],

"tableTools": {
        "sRowSelect": "os",

          "sSwfPath": "/flash/copy_cvs_xls_pdf.swf",
        "aButtons": [

            { "sExtends": "editor_create", "editor": editor },
            { "sExtends": "editor_edit",   "editor": editor },
            { "sExtends": "editor_remove", "editor": editor },


            "print",
            {"sExtends":    "collection","sButtonText": "Save","aButtons":    [ "csv", "xls", "pdf" ] }

    ]
    }
} );

} );

Answers

  • headshot9xheadshot9x Posts: 59Questions: 16Answers: 1

    Try with save .xls file

    "dom": 'T<"clear">rftip',
                    "tableTools": {
                        "aButtons": [
                             {
                                 "sTitle": "List Area",
                                 "sFileName": "FMS - *.csv",
                                 "sExtends": "xls",
                                 "mColumns": [0, 1, 2, 4, 5]
                             }
                        ],
                        "sSwfPath": "theme/datatable/tabletool2.2.4/swf/copy_csv_xls_pdf.swf"
                    }
    
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Is Flash enabled for your browser? TableTools requires Flash.

    Another option is to use Buttons which is the replacement for TableTools and does not require Flash.

    Allan

  • nokonoko Posts: 10Questions: 3Answers: 0

    yes my browser is flash enabled, still only the printer works

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Can you link to the page so I can debug it please.

  • nokonoko Posts: 10Questions: 3Answers: 0

    Thank you allan - http://www.merlinlibrary.com/admin/backup_orders_cms.php

    another weird thing that is happening in that table is that some rows are just vanishing. The would be inserted into the database because I receive a confirmation email from the front end but as soon as they arrive at the back end, some rows randomly vanish. I've been a week trying to figure it out

  • nokonoko Posts: 10Questions: 3Answers: 0

    Hey Allan any news on the save csv, excel & pdf buttons ? greatly appreciated

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    If you look at the console in your browser, or the server's error log, you will see something like:

    http://www.merlinlibrary.com/swf/copy_csv_xls_pdf.swf Failed to load resource: the server responded with a status of 404 (Not Found)

    Which explains why it isn't working. Put the SWF file in place and it should.

    The would be inserted into the database because I receive a confirmation email from the front end but as soon as they arrive at the back end, some rows randomly vanish.

    Without being able to see the full code base, I couldn't say what that is happening. If it is a DataTables issue, the DataTables support options would cover it, although not if it is a server-side issue.

    Allan

This discussion has been closed.