Tabletools with Fixed Column + thead + tfoot : export fails

Tabletools with Fixed Column + thead + tfoot : export fails

ober0330ober0330 Posts: 5Questions: 0Answers: 0
edited June 2013 in TableTools
I have tabletools on one of my datatables. I have my normal thead row and then I also have a tfoot row for some totals that I create that are beyond basic summations of the data. That all works fine in terms of exporting.

But now my client wants the first column frozen. I use the plugin elsewhere and it works fine when I'm only using the thead. But when I have thead + tfoot + frozen first column, the export totally fails. Here is my config:

[code]
var oTable = $('#dtable').dataTable({
"sScrollX": "100%",
//"sScrollXInner": "150%",
"bScrollCollapse": true,
"bPaginate": true,
"sPaginationType": "full_numbers",
"aaSorting": [[2,'asc'], [3,'asc']],
"bStateSave": false,
"oLanguage": {
"sSearch": "Search all columns:",
"sLengthMenu": 'Display '+
'20'+
'30'+
'40'+
'50'+
'100'+
'All'+
' records'
},
"aoColumnDefs": [
{ "sClass": "right", "aTargets": [ 10,11,12,13,14,15,16,17,18,19,20,21,22 ] },
{ "sType": "formatted-num", "aTargets": [ 10,11,12,13,14,15,16,17,18,19,20,21,22 ] },
{ "sType": "html", "aTargets": [ 1 ] }

],
"iDisplayLength": 20,
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sSwfPath": "<?=$env?>js/datatables/extras/TableTools/media/swf/copy_csv_xls_pdf.swf"
}

});


new FixedColumns( oTable, {
"iLeftColumns": 1
});
[/code]

Replies

  • allanallan Posts: 61,734Questions: 1Answers: 10,110 Site admin
    Fails in what way? Javascript error I'm guessing? It should work... Can you link to a test case please: http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read

    Allan
  • ober0330ober0330 Posts: 5Questions: 0Answers: 0
    Hi Allan,

    The export simply doesn't contain the data. There is garbage characters in cell A1 in the Excel and CSV exports and nothing else. There are no Javascipt errors. This is similar to the behavior when you try to use 2 thead rows with the fixed column.

    Unfortunately, my example is behind security that I cannot expose, otherwise I would have. However, here is all the files I pull in in the header:
    [code]















    [/code]

    I'm using jQuery 1.8.2 as well.

    And here is the table with one row of data:
    [code]



    ABT

    S1 
    S5 


    B
    junk
    junk2
    6906-1637
    Owning
    US Equities
    Income Core
    Abbott Labs
    1
    190.00
    0.01
    27.09
    36.21
    5,147.10
    6,879.90
    1,732.80
    33.67
    100.00
    0.00
    0.00
    1.66
    114.21
    100.00
    Yes




    Symbol
    Links
    Group
    Client
    Acct
    Superclass
    Class
    Role
    Synonym
    Tickets
    Qty
    %$Vol/Min
    Cost/Unit
    Market Price
    Total $Cost
    Total $Value
    $Gain/Loss
    %Gain/Loss
    % Alloc
    $ Expense
    % Expense
    % Yield
    $ Income
    % Total Income
    Alert




    Totals








    1




    5,147.10
    6,879.90
    1,732.80

    100.00
    0.00
    0.00
    1.66
    114.21
    100.00




    [/code]
  • ober0330ober0330 Posts: 5Questions: 0Answers: 0
    Anyone?
  • allanallan Posts: 61,734Questions: 1Answers: 10,110 Site admin
    Working example showing TableTools and FixedColumns: http://live.datatables.net/ohesof/edit#javascript,html .

    Without a test case showing the issue, I'm afraid I can't offer any help as I simply don't know what the problem is :-)

    Allan
This discussion has been closed.