SAP Knowledge Base Article - Public

1660233 - Lost focus when print dialog is displayed by PrintReport method

Symptom

Lost focus when print dialog is displayed by PrintReport method

Environment

  • Crystal Reports 2008
  • Microsoft Visual Studio 2005

Reproducing the Issue

  1. Insert PictureBox control into CrystalReportViewer control
  2. Enter code as below:

 

Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
 Try
            CRViewer.PrintReport()           

        Catch ex As Exception
        End Try
End Sub

  1. Run .NET program
  2. Click PictureBox1 control in the CrystalReportViewer
  3. Click Print button
  4. It is not possible to click the Print button because of focus is lost

Resolution

Use a Button control instead of PictureBox control

Keywords

CR 2008 12 printer clickable CR2008 , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , How To

Product

Crystal Reports 2008 V1