I have a very strange problem with the print button on a datatable. I could not find a solution.
The strange thing is that I already used the print button in datatables on different pages.
I am currently working on a ruby ββon rails project, including with datatables with the jquery-datatables-rails gemstone, version 3.3.0.
In addition, I include a CSS and JS file for the buttons, referencing the file path in the asset pipeline ( dataTables.buttons.min and buttons.datatables.min.css ).
All files are downloaded without any problems or error messages. Initializing work with data as well, but then I will add the following option:
dom: 'Bfrtip' buttons: [ 'print' ]
for the initializer, it fails with the error message below:
Uncaught Unknown button type: print dataTables.buttons.min.js? body = 1:18
Unfortunately, I could not find anyone who had the same problem on the Internet.
I followed the instructions https://datatables.net/extensions/buttons/ by adding two files to my page.
Also, when I try to use the excel button instead of the print button, an error message does not appear, but the button does not appear.
div.dt-buttons remains empty.
How can i solve this?