on 01-19-2010 1:29 PM
Hi,
We are using Crystal Reports XI (R2)
This is our current setup
To print direct to the Printer we use the PrintToPrinter method of a Crystal Report. We do not view this in the Viewer object.
It works perfect for passing the parameter, Copies, Collation, PageStart,PageEnd into this function.
We have adapted a standard Microsoft.NET PrintDialog object so that we pull the Copies, PageStart and PrinterName from this object and set in as in below code
Dim printDialog1 As New System.Windows.Forms.PrintDialog
If printDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
'Get the Copy times
Dim intCopy As Int16 = printDialog1.PrinterSettings.Copies
'Get the number of Start Page
Dim intFromPage As Int16 = printDialog1.PrinterSettings.FromPage
'Get the number of End Page
Dim intToPage As Int16 = printDialog1.PrinterSettings.ToPage
'Get the printer name
crReportDocument.PrintOptions.PrinterName = printDialog1.PrinterSettings.PrinterName
crReportDocument.PrintToPrinter(intCopy, True, intFromPage, intToPage)
End if
The problem with this is the user thinks they can change all other properties show in this PrintDialog window, but yet it'll do nothing with the Crystal Printoff. (Except PrinterName, Copies etc.)
Guess my question is, Is there an inherent PrintDialog form associated with the Crystal Report and PrintToPrinter method. I need to get a PrintDialog form to the user when they want to print without viewing, but not the one above, as all the properties can't be passed to the PrintToPrinter method?
You help and advice would be most appreciated!!
Stuart
Hello Stuart.
I know exactly what you are looking for. Many are looking for the same thing. Unfortunately, no such PrintDialog form from CR. (there used to be with the old RDC, but not with the .NET SDK). Perhaps a future version of CR... Unfortunately, your only option is to build your own form from scratch and offer the users only the print properties you want them to be able to set.
Now, you should also be able to set paper source, paper size, printer duplex, margins and a few more properties, but depending on the printer driver, not all properties can be set.
Ludek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For future people looking for solutions on this issue, Ludek has said can't be done, most certainly not in CR XI
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well at least we know now Ludek, and we thank you for your knowledge, and allowing us to go down a different avenue. Perhaps the short term answer is to use the PrintDialog form from Micrsoft as a short term solution.
Thank again, we can move on now!!
Stuart
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.