Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

223
Vistas
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 Respuestas
Responde la pregunta

0

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

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda