Click here to Skip to main content
15,883,961 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Load Report Failed at Displaying Crystal Report at online server
but works well at local well and no other error message displaying as i have put extra label for displaying load report path and ControlNo but not displaying any thing only one error msg Load Report Failed any solution please help me !!!!

ReportDocument Rel = new ReportDocument();
Rel.Load(Server.MapPath("CallLetter.rpt"));
Rel.SetDatabaseLogon("rrccr_com_dbarrc", "db@Rrcpa$$", "WIN-0QBUPD9U1G2", "rrccr_com_db");
Rel.SetDataSource(ds.Tables[0]);
Rel.SetParameterValue("ControlNo", ControlNo);
CrystalReportViewer1.ReportSource = Rel;
CrystalReportViewer1.DataBind();
CrystalReportViewer1.Visible = true;

BinaryReader stream = new BinaryReader(Rel.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat));
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = "application/pdf";
Response.BinaryWrite(stream.ReadBytes(Convert.ToInt32(stream.BaseStream.Length)));
Response.Flush();
Rel = null;
CrystalReportViewer1.Dispose();
CrystalReportSource1.Dispose();
Posted
Updated 11-Jul-14 0:08am
v2

1 solution

 
Share this answer
 
Comments
Khan Sameer 11-Jul-14 6:46am    
I have tried it but no output for this result !!!!

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