Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

227
Views
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 answers
Answer question

0

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

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!