Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to override or handle print from managed viewer control

i've recently switched from crystal XI to crystal XI R2.. in the process of doing this we've moved from the old activeX viewer to the manager viewer in for our windows app.

With the old ActiveX viewer you could handle the PrintButton_Click event from the viewer and then do your own print with your own settings (we force duplex printing in some scenarios, and other things).

The managed viewer doesn't appear to expose this event. I have tried subclassing the viewer and overriding the PrintReport method but this doesn't appear to be called when you click on the Print button in the viewer (if you run viewer.PrintReport from code it does).

I've also tried subclassing the reportdocument itself and overriding the PrintToPrinter (sp?) method there but with the same results as above - clicking the Print button in the viewer doesn't run my override, but if i run reportdocument.PrintToPrinter from code it does.

If i can't find a way to do this i will end up adding my own print button to the form and hiding the print button on the viewer.. not my first choice though.

Is there any other way to override the Print button from the managed viewer?



Former Member

Hi, Shawn;

The .NET winform viewer does not have the option to over-ride the print button. The only option is to hide the print button, and have your own button for your custom code.

Best Regards,


0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question