Today I also needed to print the datagridview that was filled with the resutls of my queries. Instead of using a report engine, I used a tool already in my toolbox, namely Rustemsoft’s datagridviewprint class. I made another extension method (I really like those things). You can find the code on our wiki.
And here is an example. I obfuscated the results just so it looks a bit more important ;-).
This is the datagridview.
And this is the printpreview.
And all that by just having this as the code.
vbnet
Me.DataGridView1.printPreview(Me.TabControl1.SelectedTab.Text, "Printed On: " & Now.ToString("dd/MM/yyyy HH:mm"))
I do have to say that this method is a bit slow but I am using an older version, perhaps the new one is faster.
You can always ask question about VB.Net on the forums.