Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cr8.5 and Error 713

Status
Not open for further replies.

StormbringerX

Programmer
Dec 14, 2000
102
US
Hi all,

I have researched this problem through the FAQ's and Keyword Searches and while I've found some pertinent information, I'm hoping someone can provide a little more detail:

I have a project using VB6, WIN2000, CR8.5, sql2000

I'm attempting to distribute this project to a clean Win2k machine ('clean' meaning that it is a new PC with nothing installed except Win2k and MDAC). Everything works except the Crystal Reports. This project has one report, and that report was written using CR8.5. Any time the report is chosen from the menu, it returns the dreaded error 713 (Application-defined or Object-defined error). From my research, it seems that this error usually is generated because of a missing, corrupt, or unregistered dll.

I have attempted to deploy the project using the VB6 Package and Deployment, then with Inno, then with MSIE all with the same result. I have checked and the crviewer.dll, craxdrt.dll, craxddt.dll are all present and registered correctly on the target machine with the same version of the dll's that are on the development machine.

To give a liitle overview:
I have created a crDesigner named crMapMaint within my application.

When the user clicks on the report from the menu, a form named frmcrMapMaint is loaded, and the code is as follows:

Code:
Option Explicit

Public crReport As crMapMaint
Public crConnect As New clsCrystalCOnnection

Private Sub Form_Load()
    Dim blnPrinterChosen As Boolean

    Set crReport = New crMapMaint
    AddDataBase
    blnPrinterChosen = FindPrinter("REPORT PRINTER")
    crReport.SelectPrinter Printer.DriverName, Printer.DeviceName, Printer.Port
    crReport.DiscardSavedData
    
    'crReport.PaperOrientation = crPortrait
    'crReport.ParameterFields(1).ClearCurrentValueAndRange
    'crReport.ParameterFields(1).AddCurrentValue (frmBusiness.txtBusinessBusNo)
    On Error Resume Next
    crReport.PaperOrientation = crPortrait 'Landscape
    'crReport.PaperOrientation = crPortrait
    'crReport.ExportOptions.PromptForExportOptions
    Screen.MousePointer = vbHourglass
    crMappingMaint.ReportSource = crReport
    'crReport.PrinterDuplex = crPRDPVertical
    'crReport.PrinterSetup (0)
    crMappingMaint.ViewReport
    Screen.MousePointer = vbDefault
End Sub

Private Sub Form_Resize()
    crMappingMaint.Top = 0
    crMappingMaint.Left = 0
    crMappingMaint.Height = ScaleHeight
    crMappingMaint.Width = ScaleWidth
End Sub

Public Sub AddDataBase()
    'Dimension the variables that we need
    Dim intLoop As Integer
    Dim strDLLName As String
    Dim strServerName As String
    Dim strDatabaseName As String
    Dim strUserName As String
    Dim strPassword As String
    'Set the variables according to the Registry entries that
    'clsCrystalConnection retrieves
    strDLLName = crConnect.DLLName
    strServerName = crConnect.ServerName
    strDatabaseName = crConnect.DatabaseName
    'strUserName = crConnect.UserName
    strPassword = crConnect.Password
    
    'Log it on
    For intLoop = 1 To 1
        crReport.Database.Tables(intLoop).SetLogOnInfo strServerName, strDatabaseName, strUserName, strPassword
    Next
    
    'crReport.Database.LogOnServer strDLLName, strServerName, strDatabaseName, strUserName, strPassword
End Sub

Private Sub Form_Unload(Cancel As Integer)
    crReport.ParameterFields(1).ClearCurrentValueAndRange
    Set crConnect = Nothing
    Set crReport = Nothing
End Sub

The last line of code executed before the error is the Set crReport = New crMapMaint at the top of the form_load.

I just frankly don't know what else to look at, other than unistalling and reinstalling the Crystal Reports on the development machine and trying it again.

I hope that I have explained this clearly. Any help would be GREATLY appreciated.

Thanks
Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top