on 02-27-2009 3:38 AM
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
SetLogOnInfo is deprecated, use the connection properties bag:
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.