Export to PDF fails using ASP.NET

I made a report based on an SP and it works great (VS 2003). Using code, I run the query and then export it to a PDF. I then made a second report, copying the code from the working page, but now I get an error on the export.

I am pulling my hair out (and I don't have that much to spare. I don't know where to begin, or what code to post.

Error in File C:\DOCUME~1\JAWHIT~1\ASPNET\LOCALS~1\Temp\temp_d34488ef-ebdf-417d-9ce7-07ab9608c65f.rpt: Error detected by export DLL:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

As a guess, i don't have CR.Net so I can't verify. Does CR.Net support loading pictures from a datasource? I think that is one of the features not in the .Net versions.

Not sure about the ASP but I have seen other code where instead of a new they used the one for the report
Try changing
Dim DiskOpts As CrystalDecisions.Shared.DiskFileDestinationOptions = New CrystalDecisions.Shared.DiskFileDestinationOptions

For Each mySection In myReport.ReportDefinition.Sections
'Drill down into the section to see if there are any sub-reports
For Each myReportObject In mySection.ReportObjects
If myReportObject.Kind = _
CrystalDecisions.[Shared].ReportObjectKind.SubreportObject Then
mySubReport = CType(myReportObject, _
CrystalDecisions.CrystalReports.Engine.SubreportObject)

'Get a reference to the sub-report object
'so we can change its properties
mySubReportDoc = mySubReport.OpenSubreport(mySubReport.SubreportName)
'Set the logon credentials
LogonToDatabase(mySubReportDoc.Database.Tables, ServerName, UserId, Password)
End If
Next
Next
Dim myExportExt As String, myExportType As String, myExportFile As String
Dim strExportType As String
strExportType = "PDF"

Private Sub LogonToDatabase(ByVal ReportTables As CrystalDecisions.CrystalReports.Engine.Tables, ByVal ServerName As String, ByVal UserId As String, ByVal Password As String)
' To Supply Logon Information to each and every Tables used in the Report
Dim myTable As CrystalDecisions.CrystalReports.Engine.Table
Dim myConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo()
Dim myLogonInfo As New CrystalDecisions.Shared.TableLogOnInfo()
myConnectionInfo.UserID = UserId
myConnectionInfo.Password = Password
myConnectionInfo.ServerName = ServerName
myLogonInfo.ConnectionInfo = myConnectionInfo
For Each myTable In ReportTables
myTable.ApplyLogOnInfo(myLogonInfo)
Next
End Sub

I hate sub reports and always consider them the last resort in any reporting solution. The negative effect on performance and maintainability is just not worth the easy ride they give the report writer. Nine times out of ten reporting requirements…

Hello everyone,
Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8.
We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…

From store locators to asset tracking and route optimization, learn how leading companies are using Google Maps APIs throughout the customer journey to increase checkout conversions, boost user engagement, and optimize order fulfillment.
Powered …

Watch the video to know the simple way to remove or recover or reset lost or forgotten passwords of Outlook PST file. With Kernel Outlook Password Recovery tool such operation is very easy to perform. It is a freeware with limitation to use with 500…