SAP Knowledge Base Article - Public

1592578 - How to disable/hide individual buttons in the Crystal Reports .NET Windows Form viewer


  • Developing a .NET Windows application using the Crystal Reports .NET SDK and the CrystalReportViewer control.
  • How to disable, or hide, individual buttons in the toolbar?
    • Eg. How to disable ONLY the "Go to Last Page" button.

Default buttons


Removed the Go to Last Page button



  • Visual Studio 2008 or 2005
  • Crystal Reports 2008 SP3


  • The fourth control in the CrystalReportViewer contains a ToolStrip of items which can be modified.
  • Each individual control can be made invisible so the user can't interact with it.
  • Please note, you should use the appropriate Show*Button property whenever possible. Only use this method if the various Show*Button properties don't suit your needs.
    • ShowCloseButton
    • ShowCopyButton
    • ShowExportButton
    • ShowGotoPageButton
    • ShowGroupTreeButton
    • ShowPageNavigationButtons
    • ShowParameterPanelButton
    • ShowPrintButton
    • ShowRefreshButton
    • ShowTextSearchButton
    • ShowZoomButton
private void DisableToolStripItems(CrystalDecisions.Windows.Forms.CrystalReportViewer crystalReportViewer1)
  System.Windows.Forms.ToolStrip oToolStrip = (System.Windows.Forms.ToolStrip)crystalReportViewer1.Controls[3];
  foreach (System.Windows.Forms.ToolStripItem oToolStripItem in oToolStrip.Items)
   switch (oToolStripItem.AccessibleName)
    case "Go to Last Page":
    case "Add more items here to disable them":
     oToolStripItem.Visible = false;
   /* Other available items on the toolstrip to disable
    Export Report
    Print Report
    Toggle Parameter Panel
    Toggle Group Tree
    Go to First Page
    Go to Previous Page
    Go to Next Page
    Go to Last Page
    Go to Page
    Find Text
    Close Current View
    * */
 catch (Exception ex)
  // Do something with exception ex.
  string message = ex.Message;



KBA , BI-DEV-NET , BI Software Development Kits (SDKs) - .NET or Other , How To


Crystal Reports 2008 V1