c# - crystal report failed -
I have created a crystal report with parameters, but this does not load the value. It only shows the title, I mean column name only. Please check your code and correct me. And I tried to load that report in PDF format, which shows an error like "Load report failed" Please correct me. Are you sure that the name of your report is Is this located in the root of your website? Protected Zero Button 2_Click (Object Sender, EventArgs E) {Report Document Reports Document = New Report Document (); Reportdocument.Load (Server.MapPath ("CrystalReport.rpt")); Reportdocument.SetDatabaseLogon ("", "", "Arvind", "My ScamDDB"); Report document. Setpermator val ("mrno", textbox 1. text); CrystalReportViewer1.ReportSource = Report Document; } Secure Zero LinkButton1_Click (Object Sender, EventArgs E) {Exportport (); Private Zero Exports () {MemoriStream Ostream; Response.Clear (); reaction. Buffer = true; Report Document Report Document = New Report Document (); Reportdocument.Load (Server.MapPath ("CrystalReort.rpt")); Reportdocument.SetDatabaseLogon ("", "", "Arvind", "My ScamDDB"); Reportdocument.SetParameterValue ("MRNO", TextBox1.Text); CrystalReportViewer1.ReportSource = Report Document; Ostream = (MemorialStream) report documentocument.ExportToStream (ExportFormatType.PortableDocFormat); // ostream = (memorystream) crReport.ExportToStream (export formatTip.PartialDoc format); Response.ContentType = "Apps / PDF"; Try to respond to feedback. BinaryWrite (oStream.ToArray ()); Response.End (); } Hold (exception before) {Label2.Visible = true; Label2.Text = "Error:" + Server HtmlEncode (ex.Message.ToString ()); } Finally {// clear stream ostream.flush (); OStream.Close (); OStream.Dispose (); }
CrystalReort.rpt < / Code>? Additionally, instead of a more general name,
CrystalReport.rpt .
Comments
Post a Comment