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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Out of Memory Problem - Urgent !!!!

Status
Not open for further replies.

nateshk

Programmer
Jan 16, 2001
49
0
0
HK
Hi All,

Iam using CrystalReportViewer to display my report. The ReportSource value is assigned during click of a button.

Also iam changing the database at runtime.

for the first click of the button it works properly. but for the second click it gives "Out of Memory".

Its logging on the server properly

also iam attaching the code

Any help will be highly appreciated.

Thanx

Natesh

code :
====================================================
Set crApp = CreateObject("CrystalRuntime.Application")
Set crRep = crApp.OpenReport(App.Path & "\x.rpt")
Set crTable = crRep.Database.Tables.Item(1)

crTable.SetLogOnInfo strServerName, strDatabase, strUID, strPwd

crvReport.ReportSource = crRep
crvReport.ViewReport
====================================================
 
Have you tried closing the control and datasource from the previous report as the first thing that happens when you "click the button"? Reebo
Scotland (Raining)
 
Natesh,

Is there no options like crApp.close? Reebo
Scotland (Raining)
 
I'm having a similar problem, but mine appears to be related to assigning values to the parameters from the VB program when it displays the second report.
You may be able to fix your problem by resetting the application and report objects. After the ViewReport line, add:

Set crRep = Nothing
Set crApp = Nothing

If anyone has help with the parameter problem, please respond.


 
I have exactly the same problem.....
But I have even the Crystal Objects disposed after usage....
Set App = nothing
Set Report = nothing
Set ParaField = Nothing 'CRAXDRT.ParameterFieldDefinition
Set cr_conn = Nothing 'CRAXDRT.ConnectionProperty
Set cr_table = Nothing 'CRAXDRT.DatabaseTable

I have a lot of problems with Crystal Reports in the whole Entreprise.... on some machine all works fine, on others the reports work every 2 or 3 times...and on some others nothing is working properly......

what could be the problem?
if anyone is interested in the whole source code...just ask it..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top