Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Posted: 23 Mar 2007 at 12:51pm
I haven't done that before. I think you have to open it yourself (it is part of the .NET library). Either that or preview it to the user and then when they print it will pop up.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
Joined: 17 Mar 2007
Online Status: Offline
Posts: 16
Posted: 23 Mar 2007 at 12:54pm
I'm wading through the documentation on the PrinterDialog class trying to figure out how to accomplish this. A lovely way to spend a Friday afternoon. Amazing how many Google's of folks wondering how to accomplish this.
I shall dive in and report back my findings, Captain.
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Posted: 23 Mar 2007 at 1:13pm
Thanks. I'll have to make sure I research this one for the .NET 2005 book. It's a good topic.
The problem with .NET 2003 is that not all properties of the Printer Dialog box can be passed to the ReportDocument class. So it will be good to hear what learn. (I'm spending my Friday researching custom role membership providers to integrate with an ASP.NET menu system - then tonight it's all night on the XI book). Fun fun fun...
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
Joined: 17 Mar 2007
Online Status: Offline
Posts: 16
Posted: 23 Mar 2007 at 1:37pm
So the 8 parameters associated with ReportDocument.PrintOptions are all I have to work with and how those values are set must be captured from the PrintDialog class, correct?
Eesh...you are having more fun than I on this fine Friday.
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Posted: 23 Mar 2007 at 2:39pm
Yep. That's what you gotta do.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
Joined: 17 Mar 2007
Online Status: Offline
Posts: 16
Posted: 27 Mar 2007 at 2:17pm
Ended up creating my own "PrintDialog" function by populating a combo box like so:
Dim i As Integer Dim pkInstalledPrinters As String
For i = 0 To PrinterSettings.InstalledPrinters.Count - 1 pkInstalledPrinters = PrinterSettings.InstalledPrinters.Item(i) ComboBox1.Items.Add(pkInstalledPrinters) Next
Then I simply captured the number of copies and name of printer and used them with the PrintToPrinter thingy.
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Posted: 27 Mar 2007 at 3:14pm
Interesting. Glad it works.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum