2
Answers

SAP Crystal Report Error

Bineesh  VP

Bineesh VP

7y
340
1
Hi,
 
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;
frmReportObj.ShowDialog();
 
// reserved a dataset for this report.:-
 

 ReportDocument rpt = new ReportDocument();


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

rpt.SetDataSource(dsAllocationReport.Tables["Table"]);

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)