Copy, CSV, XLS, PDF, Print only selected rows - Does not work
Copy, CSV, XLS, PDF, Print only selected rows - Does not work
joao_oliveira
Posts: 32Questions: 0Answers: 0
<!-- DataTables CSS -->
<!-- jQuery -->
<!-- DataTables -->
//INICIALIZAÇÃO DO SCRIPT DATATABLE
$(document).ready(function() {
var oTable = $('#tbleitos').dataTable( {
"sScrollY":"480px",
"sPaginationType": "full_numbers",
//"bPaginate": true,
//"bLengthChange": true,
//"bFilter": true,
//"bSort": true,
//"bInfo": true,
"bAutoWidth": false,
//mensagem de processamento
"bProcessing": true,
//otimização
"aaSorting": [ [0,'asc'], [1,'asc'] ],
"bProcessing": true,
"sPaginationType": "full_numbers",
"sDom": 'T<"clear">lfrtip<"footer">',
"oTableTools": {
"sRowSelect": "single",
"sSwfPath": "../datatables/extras/TableTools/media/swf/copy_csv_xls_pdf.swf",
"aButtons": [
{
"sExtends": "xls",
"sButtonText": "Excel",
"sFileName": "Relatorio.xls"
},
{
"sExtends": "pdf",
"sPdfOrientation": "landscape",
"sPdfMessage": "Hospital Santa Julia - Relatorio",
"mColumns": "visible",
"sFileName": "Relatorio.pdf"
}
]
},
//display de registros por página
"oLanguage": {
"sProcessing": "HSJ - Carregando dados...",
"sLengthMenu": "Mostrar _MENU_ registros por página.",
"sZeroRecords": "Nenhum dado encontrado.",
//"sInfoEmtpy": "Exibindo 0 a 0 de 0 registros",
"sInfo": "Exibindo de _START_ a _END_ de _TOTAL_ registros.",
"sInfoFiltered": "",
"sSearch": "Procurar:",
"oPaginate": {
"sFirst": "Primeiro",
"sPrevious": "Anterior",
"sNext": "Próximo",
"sLast": "Último"
}
},
//Parâmetros de comprimento
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "Todos"]],
"aoColumns" : [
{"sWidth": "12px"},
null,
null,
null,
null],
//"bServerSide": true,
"sAjaxSource": "consulta_cbo.php?sEcho=1" } );
setInterval(function()
{
oTable.fnDraw();
},120000);
} );
FUNÇÃO
MATRÍCULA
NOME
CBO
DESCRIÇÃO DO CBO
<!-- jQuery -->
<!-- DataTables -->
//INICIALIZAÇÃO DO SCRIPT DATATABLE
$(document).ready(function() {
var oTable = $('#tbleitos').dataTable( {
"sScrollY":"480px",
"sPaginationType": "full_numbers",
//"bPaginate": true,
//"bLengthChange": true,
//"bFilter": true,
//"bSort": true,
//"bInfo": true,
"bAutoWidth": false,
//mensagem de processamento
"bProcessing": true,
//otimização
"aaSorting": [ [0,'asc'], [1,'asc'] ],
"bProcessing": true,
"sPaginationType": "full_numbers",
"sDom": 'T<"clear">lfrtip<"footer">',
"oTableTools": {
"sRowSelect": "single",
"sSwfPath": "../datatables/extras/TableTools/media/swf/copy_csv_xls_pdf.swf",
"aButtons": [
{
"sExtends": "xls",
"sButtonText": "Excel",
"sFileName": "Relatorio.xls"
},
{
"sExtends": "pdf",
"sPdfOrientation": "landscape",
"sPdfMessage": "Hospital Santa Julia - Relatorio",
"mColumns": "visible",
"sFileName": "Relatorio.pdf"
}
]
},
//display de registros por página
"oLanguage": {
"sProcessing": "HSJ - Carregando dados...",
"sLengthMenu": "Mostrar _MENU_ registros por página.",
"sZeroRecords": "Nenhum dado encontrado.",
//"sInfoEmtpy": "Exibindo 0 a 0 de 0 registros",
"sInfo": "Exibindo de _START_ a _END_ de _TOTAL_ registros.",
"sInfoFiltered": "",
"sSearch": "Procurar:",
"oPaginate": {
"sFirst": "Primeiro",
"sPrevious": "Anterior",
"sNext": "Próximo",
"sLast": "Último"
}
},
//Parâmetros de comprimento
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "Todos"]],
"aoColumns" : [
{"sWidth": "12px"},
null,
null,
null,
null],
//"bServerSide": true,
"sAjaxSource": "consulta_cbo.php?sEcho=1" } );
setInterval(function()
{
oTable.fnDraw();
},120000);
} );
FUNÇÃO
MATRÍCULA
NOME
CBO
DESCRIÇÃO DO CBO
This discussion has been closed.
Replies
Allan
And secondly, I don't see where you are including the TableTools javascript file.
Please link to a test case so we can take a look at the problem, say what it is and say how to fix it.
Allan