title: Print report on print button in odoo10
body: <p>Hi I am having a problem in printing the report. I have coded the report format in html and then made its module and attached it with the relevant model. and upload it on my online server</p>
  
  <p>First I was receiving this error : Wkhtmltopdf failed (error code: -6). Message: The switch --header-spacing, is not support using unpatched qt, and will be ignored.The switch --header-html, is not support using unpatched qt, and will be ignored.The switch --footer-html, is not support using unpatched qt, and will be ignored.QXcbConnection: Could not connect to display</p>
  
  <p>I have solved this problem using this following link <a href="https://gist.github.com/tejastank/45b6eba13fb38e24110218e3ce50129b" rel="nofollow noreferrer">https://gist.github.com/tejastank/45b6eba13fb38e24110218e3ce50129b</a></p>
  
  <p>Its still not printing but keeps on creating child of the report in rec_name area, please see the attachment
  <a href="https://i.stack.imgur.com/MkLk0.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MkLk0.jpg" alt="enter image description here"></a>
  and showing this error on the side</p>
  
  <p><a href="https://i.stack.imgur.com/dDXXW.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dDXXW.jpg" alt="enter image description here"></a></p>
  
  <p>Questions:</p>
  
  <p>1).How I can print the report directly from the print button without getting these errors.</p>
  
  <p>One of our client give us access of there ERP for some changes, I have seen there reports when we click on print button on there ERP it downloads the PDF version pf the report and then we print it. so</p>
  
  <p>2). How can we download the report in PDF formate.</p>
  
  <p>I am using odoo10 not odoo8. Thanks in advance</p>