for print datatable i have js code is :
<script type="text/javascript">
function data(divName) {
var printContents = document.getElementById(divName).innerHTML;
var originalContents = document.body.innerHTML;
document.body.innerHTML = printContents;
window.print();
document.body.innerHTML = originalContents;
}
</script>
But in case it generate the print option and save the file but because of scrool in datatbale its not printing complete data
My anchor is given below: