'undefined' result while converting using TableTools

'undefined' result while converting using TableTools

titustitus Posts: 3Questions: 0Answers: 0
edited December 2013 in TableTools
I'm using TableTools to convert my table into PDF and XLS.
My code is shown below.

[code]
$('#reporttable').dataTable( {
"sDom": 'Tlfrtip',
"oTableTools": {
"sSwfPath": baseUrl+"assets/TableTools/media/swf/copy_cvs_xls_pdf.swf",
"aButtons": [ "xls", "pdf" ],
},
"aaSorting": [[ 1, 'asc' ]],

"aoColumns": [
{ "sTitle":"No","mDataProp": "EmployeeID" },
{ "sTitle":"ID","mDataProp": "EmployeeID" },
{ "sTitle":"Name","mDataProp": "EmployeeName" },
{ "sTitle":"Position","mDataProp": "Position" },
{ "sTitle":"Area","mDataProp": "AreaName" },
{ "sTitle":"Utility","mDataProp": "Utility" },
{ "sTitle":"Satisfaction","mDataProp": "CustSatisfaction"},
{ "sTitle":"Complaint","mDataProp": "CustComplaint" },
{ "sTitle":"Analisa","mDataProp": "Analisa" },
],
});
[/code]

There is no error when running the code, but the result of converting shows as 'undefined' content in each cell.
This is the result.

[quote]
No ID Name Position Area Utility Satisfaction Complaint Analisa
undefined undefined undefined undefined undefined undefined undefined undefined undefined
undefined undefined undefined undefined undefined undefined undefined undefined undefined
undefined undefined undefined undefined undefined undefined undefined undefined undefined
undefined undefined undefined undefined undefined undefined undefined undefined undefined
undefined undefined undefined undefined undefined undefined undefined undefined undefined
[/quote]

However, the number of row resulted is match with the number of row in the data table.
Ho can I fix it?

Thanks in advance.

Regards,

Titus

Replies

  • allanallan Posts: 63,489Questions: 1Answers: 10,469 Site admin
    Which version of TableTools are you using? Please link to test cases: http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read

    Allan
  • titustitus Posts: 3Questions: 0Answers: 0
    Dear Allan,

    I'm using the last version.
    My data source is from server, so I can't use http://live.datatables.net/ to test it

    Titus
  • titustitus Posts: 3Questions: 0Answers: 0
    I try to link to my local server.
    http://live.datatables.net/ajuzok/5/edit#preview
This discussion has been closed.