cancel
Showing results for 
Search instead for 
Did you mean: 

Viewing or closing an Report causes an GPF

Former Member
0 Kudos

Good morning from Italy!

Some of mine reports are causing an GPF when opening or closing them from my VB6 application; in the details of the Microsoft GPF Error Window - when it opens - I found the following dll's as crashing modules:

- cslibu-2-0-0.dll

- craxdrt.dll

- crpe.dll

- ufmanager.dll

- ntdll.dll

(when wished and possible I can post the screenshots).

On the customer machines runs Windows XP Professional SP3 (locale: Germany).

On my developing machine runs Windows Vista Professional SP1 (locale: Italy)

I'm using Crystal Reports XI R1 SP4 Developer Edition.

The reports are build on the Pervasive.SQL 2000i native connection combined with an <FieldDefinitionFile>, wich will be filled from the VB6 application through the <CrystalDataObject> Rowset.

Please note, that the crash also happens, when I replace the TTX file connection with an native Pervasive table or when I use an ADO Recordset to fill the TTX file (these test's I made the last days...

Sometimes also crash the VB6 IDE, indicating an Buffer Overrun Error.

Thak you for help!

Please note: These question was previously posted in the <Crystl Report Design> Forum.

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Hello Jens:

What is the exact error message?

Do you see this happening after one run, or after several runs of the report(s)?

If you see the issue after several runs, are you disposing of the report object? (myReport = Nothing)

Also, if this is occurring after several runs, are you disposing of the ADO recordset?

When the issue occurs, are you viewing the reports, printing, or exporting? If exporting, to what format? Do all export types exhibit the same issue?

Ludek

Former Member
0 Kudos

Hi Ludek,

Thank you for responding.

What is the exact error message?

Can I attach an odt File with the screenshots of the error information sent to Microsoft?

Do you see this happening after one run, or after several runs of the report(s)?

Both cases, sometime it stop's after the first run, sometimes after several call's; (please note, that I not reboot the machine after every crash...)

If you see the issue after several runs, are you disposing of the report object? (myReport = Nothing)

The reports are called within my VB6 application through an class; in the Declaration Section of the Class I create the object variable:

Dim mcrxApplication As New CRAXDRT.Application
Dim mcrxDataObject As New CrystalComObject
Dim mcrxReport As CRAXDRT.Report

then is there a function that opens the report, checks the tables and so on:

Public Function OpenReport4(ByVal Pfad As String, _
                            ByVal Bericht As String, _
                            Optional ByVal KzBericht As Long = 0, _
                            Optional ByVal DateiIndex As Integer = 0, _
                            Optional ByVal RecordSelectionFormula As String, _
                            Optional ByVal DisplayProgressDialog As Boolean = True) As cmrkShowResults

... 
omissis
...

        'Hauptobject initialisieren und <Report> laden
        Set mcrxApplication = New CRAXDRT.Application
        Set mcrxReport = mcrxApplication.OpenReport(Pfad & "" & Bericht)

...
omissis
...

End Function

the ain dataset for the TTX FIle are passed through an public CrystalComObject property; the )

Public Property Set CrystalDataObject(cdo As CrystalComObject)

    Dim intZaehler As Integer
    Dim crxConnectionProperty As CRAXDRT.ConnectionProperty
    
    Set mcrxDataObject = cdo

    'verknüpft TTX Tabellen des Reports mit den übergebenen Daten des <cdo>
    With mcrxReport
        If .HasSavedData = True Then
            .DiscardSavedData
        End If
        With .Database
            For intZaehler = 1 To .Tables.Count
                With .Tables(intZaehler)
                    '<.DLLName> ändert sich nach dem ersten Aufruf von <.SetDataSource>
                    If .DllName = "crdb_cdo.dll" Or .DllName = "crdb_fielddef.dll" Then
                        'entsprechende Tabelle suchen
                        If .Name = mstrHauptTabelleBRC Then
                            .SetDataSource mcrxDataObject, 3
                        End If
                    End If
                End With
            Next intZaehler
        End With
    End With
End Property

then the object variable is set to Nothing in the Class_Terminate event

Private Sub Class_Terminate()
    Set mcrxDataObject = Nothing
    Set mcrxReport = Nothing
    Set mcrxApplication = Nothing
    ClearModuleVariables
End Sub

Also, if this is occurring after several runs, are you disposing of the ADO recordset?

I'm working with the as you can see in the example above; but I rewrote the code for an ADO Recordset and the same errors happens...

When the issue occurs, are you viewing the reports, printing, or exporting? If exporting, to what format? Do all export types exhibit the same issue?

The errors happens usually when I open or close the preview windows; sometime the preview window is shown, but no report is displayed, sometime I can see the report and the error happens when I close the form with the ActiveX Viewer.

When no error message is displayed, the the application 'hangs in the air': i can press tool buttons, the keyboard is responding, but the Form can't be closed; I have to remove it fgrom the taskmanager.

Edited by: Jens Ferstl on Oct 9, 2008 5:29 PM

former_member183750
Active Contributor
0 Kudos

I'm not sure why you are going through the gymnastics of looping through tables and setting the database driver dll?

If the report was created correctly and you want to be passing a recordset to it, the report should only have one table... E.g.; a recordset is a one table representation of the data anyway. So, normally the code would be as simple as this:

Private Sub Form_Load()

' Open the recordset

m_RS.Open "Select * from customer where country = 'USA'", "xtreme sample database 9"

' Pass this recordset to the report engine to use as the datasource

m_Report.Database.SetDataSource m_RS

CRViewer1.ReportSource = m_Report

' The ViewReport method will start the process of the report.

CRViewer1.ViewReport

End Sub

For more information, I am going to get a White Paper attached to this post by a moderator.

Ludek

Edited by: Don Williams on Oct 10, 2008 8:15 AM

Former Member
0 Kudos

Hi Ludek,

I have to loop through the tables collection because this procedure should work for every report I create for my application: opening the Report I don't know which of the tables refers to the TTX File.

The most of my reports works in an miscellaneous environment: one TTX File and more connected Pervasive Tables; the TTX File is fine because the user can select the desired records he want to report off; the Pervasive tables contains the related information such as orders, invoices, sold goods, transactions etc.

Here a short description of the programmflow:

After opening and before viewing the report, the Pervasive tables will be manipulated from VB Code, because the name and location of the table has to be defined; all tables are checked as indicate below; please note that this procedure will be called for the main report and the subreports.

Public Function CheckReportTables2(ByRef Report As CRAXDRT.Report, ByVal ReportName As String, ByVal DateiIndex As Integer) As Boolean
    'omissis: declaration of other working vriables
    Dim crxConnectionProperty As CRAXDRT.ConnectionProperty
    Dim crxConnectionInfo As CRAXDRT.ConnectionProperties
            
    'Archive überprüfen und Verbindungen herstellen; bei Fehler: Report wird abgebrochen
    blnErr = True

    Do
        With Report.Database
            blnErrTables = False
            For intZaehler = 1 To .Tables.Count
                If .Tables(intZaehler).DllName = "crdb_p2bbtrv.dll" Then   
                    'The Procedure <CheckDatei> verfies if the file really exists
                    If CheckDatei(strDateiName, strErweiterung, strPfad, strTabelle, strDatei) = False Then
                        blnErrTables = True
                        Exit For
                    End If
                    Set crxConnectionInfo = .Tables(intZaehler).ConnectionProperties
                    .Tables(intZaehler).Location = strDatei
                    'Clear the <Data File Search Path> saved with the report: this changes from Computer to Computer
                    If crxConnectionInfo.Item("Data File Search Path") <> "" Then
                        crxConnectionInfo.Item("Data File Search Path") = ""
                    End If
                    'Verify and set the Path to the DDF Files
                    If crxConnectionInfo.Item("Data File") <> gmrk.PfadDDF & "File.DDF" Then
                        crxConnectionInfo.Item("Data File") = gmrk.PfadDDF & "File.DDF"
                    End If
                ElseIf .Tables(intZaehler).DllName = "crdb_fielddef.dll" Then
                    For Each crxConnectionProperty In .Tables(intZaehler).ConnectionProperties
                        If crxConnectionProperty.Name = "Field Definition File" Then
                            '<TTX> Datei und Pfad definieren
                            If CheckDatei(strTabelleCrx, "ttx", gmrk.PfadTTX, strTabelleCrx, strDatei) = False Then
                                blnErrTables = True
                                Exit For
                            End If
                            'Datei und Pfad definieren
                            crxConnectionProperty.Value = strDatei
                            Exit For
                        End If
                    Next
                End If
                If blnErrTables = True Then Exit For
            Next intZaehler
            If blnErrTables = True Then Exit Do
        End With
        
        blnErr = False
        Exit Do
    Loop
    CheckReportTables2 = blnErr

End Function

The will be passed the selected data from the user through the cdo Rowset to the TTX File and the report is been viewed (or printed)

The logic of the changing tablesnames: a table definies the structure for several files wich contains the data of different customers and accounting periods of time.

Thank you for your interest and patience!

former_member183750
Active Contributor
0 Kudos

Jens, unfortunately, I think this issue is beyond a forum issue. It may be a good idea to get a support case going on this. Here is my thinking:

1) You mention that you are seeing issues in crpe.dll. This should be the crpe32.dll as crpe.dll is 16 bit and has not shipped since version 8.5 of CR

2) If this is a RDC app using craxdrt.dll, crpe.dll / crpe32.dll should not be loading

3) It will be a good idea to get the report to tech support to see the table linking, etc.

4) One thing that would be good to see is a log from the Modules utility (https://smpdl.sap-ag.de/~sapidp/012002523100006252802008E/modules.zip) to see what files are loading and their versions. In particular see crdb_cdo.dll)

5) The handling of the TTX in relation to the other tables is not clear to me, so again discussing this in details will help.

As you can see from the above, there are too many details and incongruencies to resolve. Thus discussing this with a technician will be the way to go. You can obtain a single case on line from here:

http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryI...

Ludek

Former Member
0 Kudos

Hi Ludek,

Thnak you for your hints - so I will open an support case.

Only for completeness: unfortunately I wrote down the wrong DLL indicaten crpe.dll - it ist the crqe.dll (I looked at the saved screenshots). So this mistery has been cleared and I apologize for every inconvenient you had.

Answers (0)