•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 361,895 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,261 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 19223 | Replies: 1
![]() |
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
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
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
- how to show OLAP Reports in Crystal Reports in a ASP Page with Drill down option (ASP)
- How to pass parameter in Crystal report 9 (ASP.NET)
- ASP.NET Crystal Report ODBC MySQL (ASP.NET)
- asp-crystal report printing to lineprinter (ASP)
- problem in exporting crystal report (ASP.NET)
- Creating dynamic Reports (ASP.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: Start up delay and Clock freeze
- Next Thread: Get frame height and width


Linear Mode