Copy, CSV, XLS, PDF, Print only selected rows - Does not work

Copy, CSV, XLS, PDF, Print only selected rows - Does not work

joao_oliveirajoao_oliveira Posts: 32Questions: 0Answers: 0
edited November 2013 in General
<!-- 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

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Link to a test case please, as noted in the forum rules.

    Allan
  • joao_oliveirajoao_oliveira Posts: 32Questions: 0Answers: 0
    Allan, If you can not help, not hinder. You never know answer.
  • joao_oliveirajoao_oliveira Posts: 32Questions: 0Answers: 0
    I need to convert my table to excel, why can not I?
  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    [quote]Link to a test case please, as noted in the forum rules. [/quote]
    And secondly, I don't see where you are including the TableTools javascript file.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    I'm sorry my reply wasn't helpful, but it clearly stated in serval places, including the "New Discussion" form that you should link to a test case showing the problem. Otherwise we are simply guessing as to what is going wrong and can't actually offer any real help, taking up both my time and your time, when I could actually be providing "real" assistance.

    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
  • joao_oliveirajoao_oliveira Posts: 32Questions: 0Answers: 0
    Ok Allan, I will see to it that can help me.
This discussion has been closed.