none
ReportView Print Button Event RRS feed

  • Question

  • There are currently 2 events associated with the default print button in the ReportView control: Print and PrintBegin, but neither of them meets my requirement.

    What I need is the event that after the print button pushed down and before the print dialog promped out. Is there any way to do this?

    Or, is there any way to add a custom button to the toolbar of the ReportView control so I can manually set this event?

    Thanks.


    PolarAir
    Tuesday, November 16, 2010 9:10 AM

Answers

  • Currently there's not a way to add on to the default toolbar. You can also just set ReportViewer.ShowPrintButton to false and implement your own print button outside the toolbar.

    In VS2010, it's also possible to completely implement a custom toolbar with all the functionalities of the default toolbar. You can just set ReportViewer.ShowToolBar to false and show your own custom toolbar. New events such as ReportViewer.StatusChanged and members such as ReportViewer.CurrentStatus and ReportViewer.DisplayMode will help you do that.

     


    Cephas Lin This posting is provided "AS IS" with no warranties.
    • Marked as answer by PolarAir Wednesday, November 17, 2010 9:54 AM
    Tuesday, November 16, 2010 2:53 PM
    Moderator

All replies

  • Currently there's not a way to add on to the default toolbar. You can also just set ReportViewer.ShowPrintButton to false and implement your own print button outside the toolbar.

    In VS2010, it's also possible to completely implement a custom toolbar with all the functionalities of the default toolbar. You can just set ReportViewer.ShowToolBar to false and show your own custom toolbar. New events such as ReportViewer.StatusChanged and members such as ReportViewer.CurrentStatus and ReportViewer.DisplayMode will help you do that.

     


    Cephas Lin This posting is provided "AS IS" with no warranties.
    • Marked as answer by PolarAir Wednesday, November 17, 2010 9:54 AM
    Tuesday, November 16, 2010 2:53 PM
    Moderator
  • Thank you Cephas, I got it done :-)

    Right now I'm working on direct printing of a report without poping a print dialog box. I can do this, but still I'm looking forward to hearing that future versions will include all these abilities. I'm a lazy man, hehe:-)


    PolarAir
    Wednesday, November 17, 2010 9:59 AM