- Where Developers Learn, Share, & Build Careers


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. 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 (); }

Are you sure that the name of your report is CrystalReort.rpt < / Code>? Additionally, instead of a more general name, CrystalReport.rpt .

Is this located in the root of your website?

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -