I have created an CR11 report that I have intergrated with my VB6 App. I have about 10 other CR11 reports that run flawlessly. I use the same code to display each CR report:

VB Code:
  1. Option Explicit
  2. Private Report As Object
  3. Private strMode() As String
  4. Private blnFormLoaded As Boolean
  5.  
  6. Private Sub CrystalActiveXReportViewer1_PrintButtonClicked(UseDefault As Boolean)
  7.     UseDefault = False
  8.  
  9.     If Report.PrinterSetupEx(0) = False Then
  10.         Report.PrintOut False
  11.     End If
  12. End Sub
  13.  
  14. Private Sub Form_Activate()
  15. Dim rs As ADODB.Recordset
  16. Dim strSQL As String
  17. Dim a As Long
  18.  
  19. On Error GoTo Form_Activate_Error
  20.  
  21.     blnFormLoaded = True
  22.     WindowState = 0
  23.     strMode = Split(Tag, strSeparator)
  24.  
  25.         Set Report = New crDebriefingMain
  26.         strSQL = "SELECT PD.* " & _
  27.                     "FROM PD_TablePD " & _
  28.                     "Where PD.PD_ID = " & strMode(1)
  29.     End If
  30.  
  31.         Call GetRS(rs, strSQL)
  32.        
  33.             Screen.MousePointer = vbHourglass
  34.            
  35.             With Report
  36.                 .Database.SetDataSource rs
  37.                 .PaperOrientation = crPortrait
  38.                 .PaperSize = crPaperLetter
  39.                 .DiscardSavedData
  40.             End With
  41.            
  42.             With CRViewer1
  43.                 .EnableDrillDown = False
  44.                 .DisplayGroupTree = False
  45.                 .DisplayTabs = False
  46.                 .EnableRefreshButton = True
  47.                 .ReportSource = Report
  48.                 .ViewReport
  49.                 .Zoom (2)
  50.             End With
  51.            
  52.         WindowState = 2
  53.            
  54.         Screen.MousePointer = vbDefault
  55.    
  56.  
  57. Set Report = Nothing
  58.  
  59. rs.Close
  60. Set rs = Nothing
  61.  
  62. MousePointer =  vbDefault
  63.  
  64. On Error GoTo 0
  65. Exit Sub
  66.  
  67. Form_Activate_Error:
  68.     MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure Form_Activate of Form " & name
  69. Set Report = Nothing
  70. rs.Close
  71. Set rs = Nothing
  72. MousePointer =  vbDefault
  73. Unload Me
  74.  
  75. End Sub
  76.  
  77. Private Sub Form_Load()
  78.     strMode = Split(Tag, strSeparator)
  79. End Sub
  80.  
  81. Private Sub Form_Resize()
  82.     With CRViewer1
  83.         .Top = 0
  84.         .Left = 0
  85.         .Height = ScaleHeight
  86.         .Width = ScaleWidth
  87.     End With
  88. End Sub

But in one report I keep getting the same error:

Quote Originally Posted by Evil IDE
Error 75 (Path/File access error: 'C:\Docume~1\Admin\Locals~1\VBE2.tmp') in procedure Form_Activate
Any ideas? BTW I get the same meesage when I am using MSSQL 7 and MSSQL 2K5 Express


Thanks!!