0
Reply

issue while attaching datatable to a Crystal Report template.

Ask a question
Ashish B

Ashish B

15y
5.3k
1

Hi,

I am facing a formatting issue while attaching a datatable to the report template (Crystal Report) .The report runs fine for some of the reports , but sometimes gives the following exception:

CrystalDecisions.CrystalReports.Engine.InternalException:
Error in File C:\WINDOWS\TEMP\{94F13C3D-87AD-49FA-8F6E-530DF561E76F}.rpt:
The request could not be submitted for background processing. ---> System.Runtime.InteropServices.COMException (0x800002AD):
Error in File C:\WINDOWS\TEMP\{94F13C3D-87AD-49FA-8F6E-530DF561E76F}.rpt:
The request could not be submitted for background processing.
   at CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.SetDataSource(Object DataSource, String OldTableAlias, String NewTableName)
   at CrystalDecisions.CrystalReports.Engine.ReportDocument.(Object C)
   --- End of inner exception stack trace ---
   at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
   at CrystalDecisions.CrystalReports.Engine.ReportDocument.(Object C)
   at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(Object dataSet)

I am using the following lines of code for this :

ReportDocument attachDataTable(ReportDocument crExport,DataTable dt)

{

crExport.SetDataSource(dt);

return crExport;

}