cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Report XI (R2) - PrintDialog

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

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

Answers (2)

Answers (2)

Former Member
0 Kudos

For future people looking for solutions on this issue, Ludek has said can't be done, most certainly not in CR XI

Former Member
0 Kudos

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