I'm trying to export a crystal report file that has already been formatted etc. All the code works except the subroutine adds just upwards of 2kb to mem usage and doesn't clean this afterwards. The memory is added when the report object is assigned. I know that the Get Object call doesn't work, and I don't know how to fix that either...just concentrate on the mem issue though.
Dim oCrystalApp As CRAXDRT.Application
oCrystalApp = GetObject(, "CRAXDRT.ApplicationClass")
Catch ex As Exception
oCrystalApp = New CRAXDRT.Application
Dim report As CRAXDRT.Report
report = oCrystalApp.OpenReport(Server.MapPath(reportFileName), 1) '<--------MEM ADDED TO STACK HERE!!
report.MorePrintEngineErrorMessages = False
report.EnableParameterPrompting = False
'SET REPORT PARAMETERS -- **(not included for scope of this question)
report.VerifyOnEveryPrint = True
report.ExportOptions.FormatType = 31 'pdf
report.ExportOptions.DestinationType = 1 'put on the hd
report = Nothing
oCrystalApp = Nothing