Export is not working

Export is not working

akhilkhareakhilkhare Posts: 6Questions: 2Answers: 0

We implemented export feature as described on examples, but its not working for me even I tried with following options as well
1. Checked "sSwfPath"
2. Add ZeroClipboard.js as reference
3. Security settings of flash file

Print option only working fine.here pasting code for reference please guide me where I am doing mistake


<script type="text/javascript" language="javascript" src="http://cdn.datatables.net/1.10.3/js/jquery.dataTables.min.js"></script>
<script src="../DataTable/media/js/jquery.contextmenu.js"></script>
<script src="../DataTable/media/js/ZeroClipboard.js"></script>
<script src="https://datatables.net/release-datatables/extensions/TableTools/js/dataTables.tableTools.js"></script>
<script src="../DataTable/media/js/dataTables.colVis.js"></script>

<script type="text/javascript" charset="utf-8">
    var isVis = true;
    $(document).ready(function () {
        $('#example').DataTable({
            dom: 'T<"clear">lfrtip',
            tableTools: {
                "sSwfPath": "../DataTable/Media/swf/copy_csv_xls_pdf.swf",
                "aButtons": [
                    {
                        "sExtends": "collection",
                        "sButtonText": "Save",
                        "aButtons": ["csv", "xls", "pdf"]
                    }
                ]
            }
        });
    }); 

Answers

  • kevin1293909kevin1293909 Posts: 17Questions: 3Answers: 0

    Did you remember to save the .swf file that comes in the package to that location?

    http://datatables.net/releases/TableTools-2.2.3.zip

  • akhilkhareakhilkhare Posts: 6Questions: 2Answers: 0

    Thanks Kevin for your reply.

    I already saved the .swf file. but I observe that when I hosted this app to IIS its working but when I am trying to work locally its not working. Any idea why it is happening like this

  • kevin1293909kevin1293909 Posts: 17Questions: 3Answers: 0

    It could just be a path issue.. Are you getting a 404 error message at all in the debugger?

  • akhilkhareakhilkhare Posts: 6Questions: 2Answers: 0

    Nothing, I never get 404 error. same file is working on IIS. strange but it's happening

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    Can you link to the page so we can investigate please?

    Allan

This discussion has been closed.