P
patrice.pare
Hello,
Here is a summary of my Dev Environment:
I use Visual Studio 2005 Team Suite SP1 with Crystal Report XI SP1 on
a Windows XP SP2 development workstation. I also use SQL Server 2000
SP4.
And here a summary of what is the problem:
I have a web application that has a web form into which I read data
from a SQL database and load them in a ReportDocument of Crystal
Report.
The objective of this web form is to export the data into different
file format : .PDF, .DOC, .XLS.
I have no problem exporting the data to a PDF or DOC file. Neither I
get problem with the XLS (DATA ONLY). The files are created and I can
work with them.
The Error:
My problem is when I try to Export to a Excel file. I get the
following error :
The Stack Trace:
Error in File C:\DOCUME~1\HOME\ASPNET\LOCALS~1\Temp\ReportContact
{5B6B59D4-D2C1-403A-B717-3C32790340E7}.rpt:
The request could not be submitted for background processing.
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.
Exception Details: System.Runtime.InteropServices.COMException: Error
in File C:\DOCUME~1\HOME\ASPNET\LOCALS~1\Temp\ReportContact {5B6B59D4-
D2C1-403A-B717-3C32790340E7}.rpt:
The request could not be submitted for background processing.
[COMException (0x800002ad):
Error in File C:\DOCUME~1\HOME\ASPNET\LOCALS~1\Temp\ReportContact
{5B6B59D4-D2C1-403A-B717-3C32790340E7}.rpt:
The request could not be submitted for background processing.]
CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions
pExportOptions, RequestContext pRequestContext) +0
CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext
reqContext) +260
[InternalException:
Error in File C:\DOCUME~1\HOME\ASPNET\LOCALS~1\Temp\ReportContact
{5B6B59D4-D2C1-403A-B717-3C32790340E7}.rpt:
The request could not be submitted for background processing.]
CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception
e) +700
/*/*/*/*/*/*/*/
Looking for a solution:
The problem happens when this line is hit:
objReport.ExportToHttpResponse(ExportFormatType.Excel, Response, True,
sFileName)
I don't get why the three other export works and this one does not. It
is the same code safe from the line above where the parameters differ
for the obvious reasons.
Can someone explain me how to export to a Excel File please ?
Pat
Here is a summary of my Dev Environment:
I use Visual Studio 2005 Team Suite SP1 with Crystal Report XI SP1 on
a Windows XP SP2 development workstation. I also use SQL Server 2000
SP4.
And here a summary of what is the problem:
I have a web application that has a web form into which I read data
from a SQL database and load them in a ReportDocument of Crystal
Report.
The objective of this web form is to export the data into different
file format : .PDF, .DOC, .XLS.
I have no problem exporting the data to a PDF or DOC file. Neither I
get problem with the XLS (DATA ONLY). The files are created and I can
work with them.
The Error:
My problem is when I try to Export to a Excel file. I get the
following error :
The Stack Trace:
Error in File C:\DOCUME~1\HOME\ASPNET\LOCALS~1\Temp\ReportContact
{5B6B59D4-D2C1-403A-B717-3C32790340E7}.rpt:
The request could not be submitted for background processing.
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.
Exception Details: System.Runtime.InteropServices.COMException: Error
in File C:\DOCUME~1\HOME\ASPNET\LOCALS~1\Temp\ReportContact {5B6B59D4-
D2C1-403A-B717-3C32790340E7}.rpt:
The request could not be submitted for background processing.
[COMException (0x800002ad):
Error in File C:\DOCUME~1\HOME\ASPNET\LOCALS~1\Temp\ReportContact
{5B6B59D4-D2C1-403A-B717-3C32790340E7}.rpt:
The request could not be submitted for background processing.]
CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions
pExportOptions, RequestContext pRequestContext) +0
CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext
reqContext) +260
[InternalException:
Error in File C:\DOCUME~1\HOME\ASPNET\LOCALS~1\Temp\ReportContact
{5B6B59D4-D2C1-403A-B717-3C32790340E7}.rpt:
The request could not be submitted for background processing.]
CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception
e) +700
/*/*/*/*/*/*/*/
Looking for a solution:
The problem happens when this line is hit:
objReport.ExportToHttpResponse(ExportFormatType.Excel, Response, True,
sFileName)
I don't get why the three other export works and this one does not. It
is the same code safe from the line above where the parameters differ
for the obvious reasons.
Can someone explain me how to export to a Excel File please ?
Pat