Bineesh  Viswanath

Bineesh Viswanath

  • 1.2k
  • 1k
  • 699.8k

SAP Crystal Report Error

Apr 8 2017 1:32 AM
I am currently working on a reporting part of my project.  An error is coming from saying that an error has occured while loading the crystal report runtime...........
My C# code is like this:-
// to go to report form
frmReport frmReportObj = new frmReport();
frmReportObj.dsAllocationReport = dsAllocationRprt;
frmReportObj.strClientName = ddlClientName.Text;
frmReportObj.strBucket = ddlBankBucketNormal.Text;
frmReportObj.strBucketName = ddlBankBucketName.Text;
frmReportObj.strStaffID = ddlStaffID.Text;
frmReportObj.strLoanStatus = ddlLoanStatus.Text;
frmReportObj.strCycleDate = ddlCycleNo.Text;
// reserved a dataset for this report.:-

 ReportDocument rpt = new ReportDocument();

rpt.Load("C:\\CollectPlus Report\\crptAllocation.rpt");


rpt.SetParameterValue("ClientName", strClientName.ToString() == string.Empty ? "" : strClientName);

rpt.SetParameterValue("Cycle", strCycleDate.ToString() == string.Empty ? "" : strCycleDate);

crystalReportViewer1.ReportSource = rpt;

It working when I run source code, but getting error through setup exe.  

Answers (2)