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.

Bineesh ViswanathPosted Jul 12, 2017, 3:09 AM
rptDoc.Load(@"C:\New CollectPlus\Reporting\crptAllocationReport.rpt");
rptDoc.SetDataSource(dsAllocationReport.Tables["Table"]);
rptDoc.SetParameterValue("ClientName", strClientName.ToString() == string.Empty ? "" : strClientName);
rptDoc.SetParameterValue("BucketNormal", strBucket.ToString() == string.Empty ? "" : "Bucket/Normal : " + strBucket);
rptDoc.SetParameterValue("BucketName", strBucketName.ToString() == string.Empty ? "" : "Bucket : " + strBucketName);
rptDoc.SetParameterValue("StaffID", strStaffID.ToString() == string.Empty ? "" : "Staff ID :" + strStaffID);
rptDoc.SetParameterValue("LoanStatus", strLoanStatus.ToString() == string.Empty ? "" : "Loan Status : " + strLoanStatus);
rptDoc.SetParameterValue("Cycle", strCycleDate.ToString() == string.Empty ? "" : "Cycle : " + strCycleDate);
crystalReportViewer1.ReportSource = rptDoc;
Ranjit PowarPosted Apr 8, 2017, 8:37 AM