title: Printing in Visual Studio 2010
body: <p>Dear's all. <br>
  Now I'm at the end of the first part of my project and now i need to print a voucher with few pre-printing words and 7 fields that comes from a dataset.<br>
  I try to use *rdlc file on which i made all the necesary layout very good, and the link was very good as well<br>
  But print NO<br>
  I did something in *.xaml file very dificult to put controls and make the links.<br>
  But lets say i will do it, for the moment i have a picture and a label with few words, and I'm trying to print it with the following lines</p>
  
  <pre><code>Dim myPrintDialog As PrintPreviewDialog = New PrintPreviewDialog
  Dim myDocument As New PrintDocument
  myPrintDialog.Document = myDocument
  myPrintDialog.Document.DocumentName = "OrderVoucher.xaml"
  myPrintDialog.ShowDialog()
  </code></pre>
  
  <p>But in the dialog I see only a blank page.<br>
  Of course I have a mistake in my mentality of building my code but I don't know where is that.<br>
  I also need to admit that is the first time in my life which I'm trying to print from Visual Studio 2010.<br>
  Now Please I need the best assistance you can give me.<br>
  P.S.<br>
  For the moment i want to print in my default Laser printer.<br>
  But in the final stage i will have to print in an Olivetti PR2 (Bank printer) which will be connected in the com: port.<br>
  That will be the day if I succeed :) <br></p>