data table print
data table print
hi, am using datatable.js to draw a table for report. below is the code..
report runs fine but when in click print then in print preview it shows only 20,30 rows with scrollbar.. how can i make it printer friendly.
http://live.datatables.net/sumegobo/3/edit
jqv111('#report-results').dataTable({
            "scrollY": Math.round($(window).height() * 0.90),
            "scrollX": Math.round($(window).width() * 0.895),
            "ordering": false,
            "searching": false,
            "paging": false,
            //"autoWidth": true,
            "info": false
        });
    jqv111('html, body').animate({
        scrollTop: $("#content_primary").offset().top
    }, 1000);
    var tableH = jqv111('#report-results').height() + 25;
    var windowH = $(window).height() - $('div.reports-section').offset().top - 25;
    var reportH = 0;
    if (tableH > windowH) {
        reportH = windowH;
    }
    else {
        reportH = tableH;
    }
    jqv111('div.dataTables_scrollBody').css('height', reportH);
                
Answers
well tried below approach.
1. on print click create a new in memory table and fill it with cloned cells from orignal rendered table
For a print view you could try using TableTools: http://live.datatables.net/voxuwedi/1/edit .
Allan