'undefined' result while converting using TableTools
'undefined' result while converting using TableTools
titus
Posts: 3Questions: 0Answers: 0
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
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
This discussion has been closed.
Replies
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
http://live.datatables.net/ajuzok/5/edit#preview