Table Tools doesn´t export pdf using fnCellRender and tabs

Table Tools doesn´t export pdf using fnCellRender and tabs

ibanfribanfr Posts: 1Questions: 0Answers: 0
edited February 2013 in TableTools

I'm using datatables within jquery ui tabs and I use table tools plugin to export table data as CSV, and PDF files.

In addition I use fnCellRender to pre-process the data of the table before exporting it, so I can export the values of the html inputs included in datatables.

I see this post:

and I use the code suggested in this tutorial:

but the pdf exporting isn't working on hidden tabs. Pdf button is clickable but nothing happens when I click on it. csv and copy buttons works ok.

I think the problem is related with fnCellRender option, because if I remove this option form the code the pdf exporting works ok, but in this case I can´t export the input fields content.

Here is the initialisation code of one of my tables:

var oTableObjMensual = $('#listado_mensual').dataTable({
"aaSorting": [],
"bAutoWidth": false,
"sDom": '<"clear">lfrtip<"pie"T>',
"oTableTools": {
"aButtons": [
{"sExtends": "copy", "sButtonText": "<?= literal("Copiar");?>","sButtonClass": "botones_pie", "mColumns": "all"},
{"sExtends": "xls","sButtonClass": "botones_pie", "sTitle": "<?= literal("Objetivo Mensual");?>", "mColumns": "all","fnCellRender": contenido_exportarDatatable} ,
{"sExtends": "pdf","sButtonClass": "botones_pie","sPdfOrientation": "landscape", "sTitle": "<?= literal("Objetivo Mensual");?>","sPdfSize": "tabloid","mColumns": "all",
"fnCellRender": function ( sValue, iColumn, nTr, iDataIndex ) {
var valueExport = "";
var data = $(sValue)[0];
var tag = data.tagName;


valueExport = data.innerHTML;

}else if(tag==='INPUT'){

valueExport = data.value;

return valueExport;
"sSwfPath": "/jquery/plugins/DataTables-1.9.4/extras/TableTools-2.1.4/media/swf/copy_csv_xls_pdf.swf"
"oLanguage": {
"sUrl": "/jquery/plugins/DataTables-1.9.4/language/es_ES.txt"

If anyone know the solution please help me.
This discussion has been closed.