Load report failed.
-
i have problem in crystalreport. error:Load report failed.
Vpost vpost = new Vpost();
int nopersoneli;
int.TryParse(vpost.txtNoPersoneli.Text.ToString(), out nopersoneli);
ReportDocument reportDocument = new ReportDocument();
ParameterField paramField = new ParameterField();
ParameterFields paramFields = new ParameterFields();
ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
paramField.Name = "@nopersoneli";
paramDiscreteValue.Value = nopersoneli;
paramField.CurrentValues.Add(paramDiscreteValue);
paramFields.Add(paramField);
crystalReportViewer1.ParameterFieldInfo = paramFields;
** reportDocument.Load("PostCrystalReport1.rpt");** reportDocument.SetDatabaseLogon("", "", "niloofar\\i2", "vezaratekar", false);
crystalReportViewer1.ReportSource = reportDocument; -
i have problem in crystalreport. error:Load report failed.
Vpost vpost = new Vpost();
int nopersoneli;
int.TryParse(vpost.txtNoPersoneli.Text.ToString(), out nopersoneli);
ReportDocument reportDocument = new ReportDocument();
ParameterField paramField = new ParameterField();
ParameterFields paramFields = new ParameterFields();
ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
paramField.Name = "@nopersoneli";
paramDiscreteValue.Value = nopersoneli;
paramField.CurrentValues.Add(paramDiscreteValue);
paramFields.Add(paramField);
crystalReportViewer1.ParameterFieldInfo = paramFields;
** reportDocument.Load("PostCrystalReport1.rpt");** reportDocument.SetDatabaseLogon("", "", "niloofar\\i2", "vezaratekar", false);
crystalReportViewer1.ReportSource = reportDocument;Hello, You might have tried these suggestions already but here is what I would check for the error "Load Report Failed". 1. If you are loading the report from a file be positive the filepath is correct. 2. ASPNET account needs access to the TEMP directory on the server. 3. Make sure to set the reportviewer's reportsource in page_init. Also, you can handle the reportviewers error event and see if a different exception is available there. Hope this helps :).
Regards, John Adams ComponentOne LLC