Problem with Crystal Report in ASP.NET

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Mar 2005
Posts: 7
Reputation: deeraj is an unknown quantity at this point 
Solved Threads: 0
deeraj's Avatar
deeraj deeraj is offline Offline
Newbie Poster

Problem with Crystal Report in ASP.NET

 
0
  #1
Jun 6th, 2005
Hi,
I am developing an ASP.NET application which uses Crystal reports 9. It was
working fine. But later I installed the trial Crystal Report 11. After that
the generating of the reports gives the folowing error

"System.Runtime.InteropServices.COMException: Not enough memory for
operation."

The change of version may not be the actual cause but I cant trace out what
other change I might have done to cause this.

This is my code :
Imports System.Data.SqlClient
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports CrystalDecisions.Web
----------------------------------------------------
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim RptFilePath As String
Dim ReportDoc As New ReportDocument
Dim RptExportOpt As CrystalDecisions.Shared.ExportOptions
Dim ExportLocation As New
CrystalDecisions.Shared.DiskFileDestinationOptions
Dim ExportPath As String

RptFilePath = "C:\Report1.rpt"

'this is the line that gives the error:
ReportDoc.Load(RptFilePath)

ReportDoc.Refresh()
ReportDoc.SetDatabaseLogon("myuser", "mypwd", "myserver", "myDB")
ReportDoc.SetParameterValue("From", "qwe")
ReportDoc.SetParameterValue("To", "asd")
' two parameters that are passed to the report

ExportPath = "C:\report.pdf"
ExportLocation.DiskFileName = ExportPath
RptExportOpt = ReportDoc.ExportOptions
With RptExportOpt
.DestinationOptions = ExportLocation
.ExportDestinationType = .ExportDestinationType.DiskFile
.ExportFormatType = .ExportFormatType.PortableDocFormat
End With

ReportDoc.Export()
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.WriteFile(ExportPath)
Response.Flush()
Response.Close()
System.IO.File.Delete(ExportPath)
End Sub
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 175
Reputation: Letscode is an unknown quantity at this point 
Solved Threads: 6
Letscode's Avatar
Letscode Letscode is offline Offline
Junior Poster

Re: Problem with Crystal Report in ASP.NET

 
0
  #2
Jun 14th, 2005
Check out the business objects Website...for help on Crystal reports
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 9
Reputation: dotyell is an unknown quantity at this point 
Solved Threads: 2
dotyell dotyell is offline Offline
Newbie Poster

Re: Problem with Crystal Report in ASP.NET

 
0
  #3
Oct 31st, 2008
Try installing the full version of crystal XI. It must work. I had the same problem when I installed the trial version, from crystal IIX. Once I got the non-trial version, everything went back to normal. Gd luck.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC