TableTools 2.0 - Copied 0 rows to the clipboard

TableTools 2.0 - Copied 0 rows to the clipboard

edited February 2011 in TableTools Posts: 6
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:
<script language="JavaScript" type="text/javascript"> $(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 );


  • Posts: 21,673
    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: . Alternatively put it up on a web-server with the correct path and that should do it.

  • ohooho
    edited February 2011 Posts: 6
    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?

  • edited February 2012 Posts: 2
    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:

    <script language="JavaScript" type="text/javascript"> $(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": " - 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" } } } );
    Using TableTools version 2.0.2 with DataTables 1.9.0.
  • Allan, i solved my issue removing "sRowSelect": "single" from oTableTools initialization.
  • Posts: 21,673
    @Gomesfmp - to get my fix from 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.

This discussion has been closed.