cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Report Viewer "Memory Full" Error

Former Member
0 Kudos

CR Version: 9.2 (No Service packs)

OS: Windows XP Pro SP2

Dev Platform: VB6

DB: SQL Server 2000

I am getting a Memory Full error randomly while viewing the report. Managed to narrow down the function (vb code) at which the error is triggered but I am not able to figure out a solution.

THE ERROR OCCURS WHEN Load frmCRView is called for the THIRD TIME in the Function ProcessInNewDesigner

I hope I was able to put my problem down here...

Appreciate any Help here.

Thanks & Regards,

Arull Prakash

Function ProcessInNewDesigner() As Boolean

' 'Include error handler later.

g_blnNewReportProcessed = False

g_intPassNumber = 1

g_blnLastPageReached = False

Load frmCRView

Unload frmCRView

Set frmCRView = Nothing

'Other data process code..... updation to db

g_intPassNumber = 2

g_blnLastPageReached = False

Load frmCRView_New

Unload frmCRView_New

DoEvents

Set frmCRView = Nothing

'Other data process code..... updation to db

g_intPassNumber = 3

g_blnLastPageReached = False

Load frmCRView

Unload frmCRView

DoEvents

Set frmCRView = Nothing

Call After_Designer_Updations()

'Other code here.....

End Function

Private Sub frmCRView_Load()

Call subProcessReport

End Sub

Private Sub subProcessReport()

Dim Final_Rpt As New CrystalReportDesigner1

If GlobalSQLMode = 0 Then

Final_Rpt.Database.Tables(1).SetLogOnInfo ServerName, Final.DefaultDatabase

Else

Final_Rpt.Database.Tables(1).SetLogOnInfo ServerName, Final.DefaultDatabase, "sa", GlobalSQLsaPwd

End If

Final_Rpt.SQLQueryString = gPSQL

Final_Rpt.DiscardSavedData

Final_Rpt.Database.Verify

CRViewer1.ReportSource = Final_Rpt

CRViewer1.ViewReport

Dim iPages As Integer

Call CRViewer1.ShowFirstPage

Dim iTotalPages As Integer

For iPages = 1 To 1000 ' iTotalPages

DoEvents

Call CRViewer1.ShowNthPage(iPages)

DoEvents

If g_intPassNumber = 1 Then

' Custom code here....

ElseIf g_intPassNumber = 2 Then

' Custom code here....

Else

-- ERROR IS TRIGGER HERE ---

' Custom code here....

End If

If g_blnLastPageReached Then Exit For

Next iPages

Call CRViewer1.ShowFirstPage

Set Final_Rpt = Nothing

Exit Sub

End Sub

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

SetLogOnInfo is deprecated, use the connection properties bag:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00635998-751e-2b10-9cba-f50ee1e4...

Also, ensure you are working with the latest CR Service pack. SPs are here:

https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/bobj_download/main.htm

Ludek

Former Member
0 Kudos

I forgot to mention that the application in Question was working perfectly fine until we changed the Deployment PC from Windows 2000 to Windows XP. The EXE's compiled using Windows XP Pro with SP2 are giving this (Memory Full) errors.

Former Member
0 Kudos

Hi Aroll,

I would suggest you to apply latest service pack for Crystal Reports :

[https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/bobj_download/main.htm]

Regards,

Shweta

Answers (0)