Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

229
Visualizações
Data table Print, pdf EXPORT and CSV NOT WORKING IN Electron app

I am developing an Electron js application and new in data table. i have added print and export option on my script. unfortunately blank popup screen showing when press on print button. CSV, PDF export button not appearing in the screen.

Can any one help to solve this issue?

here is my complete script

var $  = require( 'jquery' );
var dt = require( 'datatables.net' )();
require( 'datatables.net-buttons/js/buttons.colVis.js' )(); //# Column visibility
require( 'datatables.net-buttons/js/buttons.html5.js' )();  //# HTML 5 file export
require( 'datatables.net-buttons/js/buttons.print.js' )();  //# Print view butto

$(document).ready( function () {
        
    var table = $('#table_id').DataTable({
        "dom": '<"toolbar">Bfrtip',
        "language": {
            "paginate": {
                "next": "Next"
            }
        },
        buttons: [
            'copy', 'csv', 'excel', 'pdf', 'print'
        ]
    })

    $("div.toolbar").html('<input class="datePicker" type="month" name="" id="dated">');

    dated.onchange = evt =>{
        table.draw();
    }

    $.fn.dataTable.ext.search.push(
        function(settings, data, dataIndex) {
            var sdate =  $('#dated').val().split('-')
            var month = sdate[1]
            var year = sdate[0]
            
            console.log(data)

            var date = data[1].split('-');
            
            if ((isNaN(year) && isNaN(month)) ||
                (isNaN(month) && year == date[0]) ||
                (date[1] == month && isNaN(year)) ||
                (date[1] == month && year == date[0])
            ) {
                return true;
            }
            
            return false;
        }
    );
});

Only white blank popup appear when press the print button. not showing print preview etc..

There is no export button other than print

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I have used tabulator instead of data table. tabulator working fine and easy to use.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda