When trying to print a datatable using the following JavaScript code:
<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>
The print option is generated and the file is saved, however, due to the scroll in the datatable, it does not print complete data.
Below is the anchor tag I am using: