Print Button does not show records in Chrome
Print Button does not show records in Chrome
DataTables is incredible!! I keep finding new features that make me fall in love all over again. The most recent are the Buttons extensions...I'm working on implementing Copy, Excel, PDF, and Print. The first three are working with no issues, but Print is giving me problems. When trying to print in Chrome, if I click the Print button, the new tab opens up and I can see that the table is getting fully populated before being covered by the print preview. The print preview only shows the title of the page and does not show the datatable at all.
I work for a school system and this particular page is public, so it can be viewed here:
https://assessment.jefferson.kyschools.us/DMC/BM/SSP
It will default to the 2017-18 school year, so near the top left-hand corner select the 2016-17 school year to see data. Any ideas as to what I'm doing wrong with the printing?
Answers
Hi puffster,
Yours is like this
Maybe play around with it like this.
Rob!!
Thanks for the quick response! Unfortunately, it did not solve the problem. I can see that your suggested changes took place when the table is recreated, but it still shows just the Title in print preview. I took some screen shots to show what the regenerated table looks like, not sure if it will help but it can't hurt
That's odd! Could you add
autoPrint: false
to your initialisation for the button? Will be interesting to see if it can be printed manually after a short time.Allan
p.s. Thanks for your kind words
hmmmm
I added the autoPrint: false and no change.
So here's what my initialization looks like currently:
And here's what my rendered html dataTable is looking like (as copied from Google Chrome):
Update -- it's NOT a DataTables issue (but I'm sure you knew that already
I've continued to test and discovered that NOTHING on my website wants to print. I went to the home page and several other pages that do not have DataTables, and if I right-click and select Print... the same thing happens -- it just pulls up the Title of the web page but no other content. If you get bored, give it a try:
https://assessment.jefferson.kyschools.us/DMC/
Have you ever seen anything like this? Is there a simple "Print/Don't Print" web setting that I just don't know about? I know I can't be that lucky...
Have you googled "Chrome not printing"?
I've been using Chrome to test with, but have verified that it is this way for all browsers...so it's definitely my website, but I have no clue what I could have done. I designed it using Visual Studio 2010 and have recently exported it into Visual Studio 2015. I'm trying to use as litlle asp.net as possible though and trying to stick mostly to html5, jquery, and bootstrap.
"The server at assessment.jefferson.kyschools.us is taking too long to respond."
Several attempts have resulted in the same message.
Well this is embarrassing, but I found the problem. Apparently at some point during development I included a css script in the master page, which included this little gem:
I removed it and DataTables print is working like a dream! Really sorry to take up everybody's time, but thanks for all the suggestions.
Heh - easy done. Well found! That could have been a nightmare to find.
Thanks for the update
Allan
Try this solution: found this thread