TableTools 2.0 - Copied 0 rows to the clipboard

TableTools 2.0 - Copied 0 rows to the clipboard

ohooho Posts: 6Questions: 0Answers: 0
edited February 2011 in TableTools
Hi all,
Hi allen. Great job, your Tabletools. But I have Problems to "connect" to the datatable object.
I'm using jquery, datatables, tabletools, JqueryUI and Fixed header.

All ist working so far, but tabletools will not copy anything to the clipboard or export in pdf,xls and csv.
The errormessage is "Copied 0 rows to the clipboard.
While initializising the page i get an error in ZeroClipboard.js >>> "the object does not support this property or method"

I read somthing about realtive and absolute path to the swf file. I used an absolute path.
Any suggestions where i can start searching for ?

thanx a lot

This is my initialization code:
--------------------------------------------------------------------------
[code]

$(document).ready(function() {
var oTable = $('#Tabelle1').dataTable({
"bPaginate":true
,"oLanguage":{"sUrl":"E:/WWW/Scripts/de_DE.txt"}
,"bJQueryUI":true
,"sPaginationType":"full_numbers"
,"sDom":'T<"clear">lfrtip'
,"oTableTools": {
"sRowSelect": "multi"
,"sSwfPath": "E:/WWW/Scripts/copy_cvs_xls_pdf.swf"
,"aButtons": ["copy","print",{"sExtends":"collection","sButtonText": "Click!","aButtons":["copy","print","csv", "xls", "pdf" ]}]
}
});
new FixedHeader( oTable );
[/code]

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Given that you are using a file:// path (you might want to add that btw - since you browser will be treating that string as a relative path) you need to add a security exception to Flash for that path: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html . Alternatively put it up on a web-server with the correct path and that should do it.

    Allan
  • ohooho Posts: 6Questions: 0Answers: 0
    edited February 2011
    thx for the tip.
    I got the same error, while making a modifikation to flash security, but putting the swf to a webserver helps!
    Interessting: The "single" Copy and pdf button works. The collection dosen't. "0 Rows copied ..." when i use
    the collection buttons. Why? And: While i ran the table the second time, i'll get "0 Rows copied..."
    Any chance to reset during init?

    Another problem is the select feature. The select all deselect all buttons are displayed correctly.
    Clicking the buttons will change the botton, but no rows are selected or deselected.
    Clicking a single row makes no change to it. is there a debug switch in datatables?

    thx
    oho
  • GomesfmpGomesfmp Posts: 2Questions: 0Answers: 0
    edited February 2012
    Hello Allan,

    I have the same problem.
    All works fine, but exporting to csv, excell or pdf, file is saved only with headers, when i was 400 rows in table. Copy to clipboard returns "Copied 0 rows to the clipboard". Only print button works as expected.

    This is my initialization code:

    [code]


    $(document).ready(function () {
    $('#myDataTable').dataTable(
    {
    "bJQueryUI": true,
    "sPaginationType": "full_numbers",
    "bProcessing": true,
    "aaSorting": [[1, "desc"]],
    "sDom": 'T<"clear"><"H"lfr>t<"F"ip>',
    "oTableTools": {
    "sSwfPath": "../Content/Datatables/copy_cvs_xls_pdf.swf",
    "sRowSelect": "single",
    "aButtons": [
    {
    "sExtends": "copy",
    "sButtonText": "Copiar"
    },
    {
    "sExtends": "csv",
    "sButtonText": "Gravar em CSV"
    },
    {
    "sExtends": "xls",
    "sButtonText": "Gravar em Excel"
    },
    {
    "sExtends": "pdf",
    "sButtonText": "Gravar em PDF",
    "sPdfOrientation": "landscape",
    "sPdfMessage": "FMGHost.net - Lista de Sorteios"
    },
    {
    "sExtends": "print",
    "sButtonText": "Imprimir"
    }
    ]
    },
    "oLanguage": {
    "sLengthMenu": "Mostrar _MENU_ registos por página",
    "sZeroRecords": "Nenhum registo encontrado!",
    "sInfo": "A mostrar de _START_ a _END_ de um total de _TOTAL_ registos",
    "sInfoEmpty": "Sem registos para mostrar",
    "sInfoFiltered": "(filtrado um total de _MAX_ registos)",
    "sSearch": "Procurar:",
    "oPaginate": {
    "sFirst": "Início",
    "sPrevious": "Anterior",
    "sNext": "Próximo",
    "sLast": "Último"
    }
    }
    }
    );

    [/code]

    Using TableTools version 2.0.2 with DataTables 1.9.0.
    Thanks,
    Gomes
  • GomesfmpGomesfmp Posts: 2Questions: 0Answers: 0
    Allan, i solved my issue removing "sRowSelect": "single" from oTableTools initialization.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    @Gomesfmp - to get my fix from http://datatables.net/forums/discussion/8357 which covers the issue you were seeing. You would need to be using the 2.0.3 development version from the downloads page to get the fix.

    Allan
This discussion has been closed.