Click here to Skip to main content
15,886,788 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am binding Crystal Report using the dataset. Crystal Report Version used is 10.5.3700.0
But in the hosted application server I am getting below exception
Crystal Report Error: The request could not be submitted for background processing

Code binding the Crystal Report is updated below.

What I have tried:

My code is as below:
string reportPath = Server.MapPath("~//Reports//UserList.rpt");

          BLL_AdminReports objclass = new BLL_AdminReports();
          DateTime  FromDate = DateTime.ParseExact(txtFromDate.Value.Trim(), "dd/MM/yyyy", CultureInfo.InvariantCulture);
          DateTime ToDate = DateTime.ParseExact(txtToDate.Value.Trim(), "dd/MM/yyyy", CultureInfo.InvariantCulture);
          DataSet ds = objclass.getUserListReport(Convert.ToDecimal(drdUserId.SelectedValue.ToString()),  FromDate, ToDate);
          DataTable dt = new DataTable();
          if (ds.Tables[0].Rows.Count > 0)
              dt = ds.Tables[0];
          else
          {
              Common.showMessage("No Records Found", this);
              return;
          }

          //--Initializing CrystalReport
          reportDocument = new ReportDocument();
          reportDocument.Load(reportPath);
          reportDocument.SetDataSource(dt);


          //passing input criteria to report
          //reportDocument.SetParameterValue("@rolename", drdUserId.SelectedItem.Text);
          reportDocument.SetParameterValue("@PrintUser",  Session["USER_NAME"].ToString());
          reportDocument.SetParameterValue("@fromdate", txtFromDate.Value );
          reportDocument.SetParameterValue("@todate", txtToDate.Value );

          //--Binding report with CrystalReportViewer
          CRVRUserListReport.ReportSource = reportDocument;
          CRVRUserListReport.DataBind();
Posted
Comments
Graeme_Grant 24-Jan-23 8:29am    
what is the inner exception message?
Member 7513082 24-Jan-23 10:20am    
Same exception coming for all reports which worked in another server before.
Timestamp: 18/01/2023 13:39:59 Message: HandlingInstanceID: 95ef3293-2198-402b-9f55-7fa86e93a8c8
An exception of type 'CrystalDecisions.CrystalReports.Engine.InternalException' occurred and was caught.
--------------------------------------------------------------------------------------------------------
01/18/2023 13:39:59
Type : CrystalDecisions.CrystalReports.Engine.InternalException, CrystalDecisions.Shared, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
Message : 
Error in File C:\Windows\TEMP\Charge_DDALodgement {D5AF8070-2EA7-44D4-9D5A-DBFD7060F5EF}.rpt:
The request could not be submitted for background processing.
Source : CrystalDecisions.ReportAppServer.DataSetConversion
Help link : 
ErrorID : -256
Data : System.Collections.ListDictionaryInternal
TargetSite : Boolean ThrowDotNetException(System.Exception)
HResult : -2147221760
Stack Trace :    at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
   at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object val, Type type)
   at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(DataTable dataTable)
   at Reports_Charge_DDALodgement.ViewReport() Additional Info: MachineName : AHB01DDDSAPV02
TimeStamp : 18/01/2023 09:39:59
FullName : Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
AppDomainName : /LM/W3SVC/1/ROOT/DDS_LIVE_TRANSACT-1-133185083422805480
ThreadIdentity : 
WindowsIdentity : IIS APPPOOL\DefaultAppPool
    Inner Exception
    ---------------
    Type : System.Runtime.InteropServices.COMException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Message : 
Error in File C:\Windows\TEMP\Charge_DDALodgement {D5AF8070-2EA7-44D4-9D5A-DBFD7060F5EF}.rpt:
The request could not be submitted for background processing.
    Source : Analysis Server
    Help link : 
    ErrorCode : -2147482963
    Data : System.Collections.ListDictionaryInternal
    TargetSite : Void ReplaceConnection(System.Object, System.Object, System.Object, System.Object)
    HResult : -2147482963
    Stack Trace :    at CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.ReplaceConnection(Object oldConnection, Object newConnection, Object parameterFields, Object crDBOptionUseDefault)
       at CrystalDecisions.CrystalReports.Engine.Table.SetDataSource(Object val, Type type)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object val, Type type)
Graeme_Grant 24-Jan-23 10:36am    
If I am reading this correctly, the .rpt file has the wrong DB connection string.
* Error in File C:\Windows\TEMP\Charge_DDALodgement {D5AF8070-2EA7-44D4-9D5A-DBFD7060F5EF}.rpt > at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object val, Type type)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(DataTable dataTable)
at Reports_Charge_DDALodgement.ViewReport() Additional Info: MachineName : AHB01DDDSAPV02
Sandeep Mewara 24-Jan-23 13:18pm    
Are you including any jpg images in your report?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900