title: create html page and print to new tab in javascript
body: <p>create html page as inline and that page open to new tab and show print view</p>
  
  <p>i tried with this code but not working..</p>
  
  <pre><code>     var mywindow = window.open('', 'Print  Report', 'height=400,width=600');
       mywindow.document.write('&lt;html&gt;&lt;head&gt;&lt;title&gt;Print  Report&lt;/title&gt;');
       mywindow.document.write('&lt;/head&gt;&lt;body &gt;&lt;table  border="1" style="width: 500px; height: 300px;"&gt;');
       mywindow.document.write(htmlTable);
       mywindow.document.write('&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;');
       mywindow.open().print();
  </code></pre>