Click here to Skip to main content
15,886,058 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Error occur while generate a crystal report after deployment . I use visual studio 2010
Unhandled exception has occurred in your application.  If you click Continue, the application will ignore this error and attempt to continue.  If you click Quit, the application will close immediately.
Length cannot be less than zero.
Parameter name:  length.
Posted
Comments
Krunal Rohit 17-Jan-14 12:50pm    
Can you please upload your code ?
Muhammed Shuhaib 19-Jan-14 10:01am    
private void crystalReportViewer1_Load(object sender, EventArgs e)
{
this.crystalReportViewer1.RefreshReport();
rd = new ReportDocument();
String reportpath = Application.StartupPath;
reportpath = reportpath.Substring(0, reportpath.LastIndexOf("bin"));
rd.Load(reportpath + "PatientReportNonReactive.rpt");
DataSet ds = prc.nonReactiveReportNew(cond);
rd.SetDataSource(ds.Tables[0]);
crystalReportViewer1.ReportSource = rd;
crystalReportViewer1.RefreshReport();
}
ZurdoDev 17-Jan-14 14:22pm    
Sounds like an issue with the LEFT() or SUBSTRING() functions or something similar.
sahabiswarup 18-Jan-14 0:19am    
use try Try catch in your code block from where you are calling crystal report; you'll get the exact error from the catch block. That error might because of some parameters you are sending to crystal 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