Crystal Report Error: The request could not be submitted for background processing
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();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)