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

HELP!!!

Status
Not open for further replies.

rogerluo

Programmer
Aug 13, 2001
21
0
0
GB
I tried to open a external cystal report within Visual Basic 6.0.

the report would be opened in the first time. however, when you want to open the report by enter different parameter, the error message "Memory Full" is received. my code as follow,
'General Declarations
Dim crxReport As CRAXDRT.Report
Dim crxApplication As New CRAXDRT.Application

private sub ***()
Set crxApplication = CreateObject("CrystalRuntime.Application")
Set crxReport = crxApplication.OpenReport("h:\vb\CRVB\2.rpt")

crxReport.ParameterFields.Item(1).AddCurrentValue ACCOUNT

crxReport.ParameterFields.Item(2).AddCurrentValue StatementFreq

crxReport.ParameterFields.Item(3).AddCurrentValue fromdate

crxReport.ParameterFields.Item(4).AddCurrentValue todate

crxReport.MorePrintEngineErrorMessages = False
CRViewer1.ReportSource = crxReport


CRViewer1.ViewReport
crxReport.PrintOut
Set crxReport = Nothing
Set crxApplication = Nothing

end sub

anyone know how to sort it out?

thanks lot.

 
You don't want this line for starters. Dim .. As New has already created the app object:

Set crxApplication = CreateObject("CrystalRuntime.Application")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top