1592059 - How to hide the <Apply> and <Delete> buttons on the CR for .NET viewer's parameter panel?

SAP Knowledge Base Article - Public

1592059 - How to hide the <Apply> and <Delete> buttons on the CR for .NET viewer's parameter panel?

Symptom

  • The SAP Crystal Reports viewer has a parameter panel with <Apply> and <Delete> buttons

''

  • What code is needed to hide these buttons?

Resolution

  • Use the following code
Private Sub CrystalReportViewer1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Load
        Dim ControlType As String
        For Each ctrl As Control In CrystalReportViewer1.Controls
            'find parameter panel
            ControlType = (ctrl.GetType.ToString)
            If ControlType = "CrystalDecisions.Windows.Forms.InteractiveParameterPanel" Then
                Debug.Print(ctrl.GetType.ToString)
                ctrl.Controls(1).Visible = False
            End If
        Next
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        CrystalReportViewer1.ToolPanelView = Forms.ToolPanelViewType.ParameterPanel
    End Sub

Keywords

hide panel button delete control net crystal framework viewer , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , How To

Product

Crystal Reports 2008 V1 ; SAP Crystal Reports, developer version for Microsoft Visual Studio