I am developing windows application using C# and Ms sql.
here is my codehere is the designer codeCode:namespace rentalMaster { public partial class reportrentstatus : Form { SqlConnection dbcon = new SqlConnection(ConfigurationManager.ConnectionStrings["mydbcon"].ConnectionString); public reportrentstatus() { InitializeComponent(); } private void reportrentstatus_Load(object sender, EventArgs e) { }
when i run this it gives me this error:Code:namespace rentalMaster { partial class reportrentstatus { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(reportrentstatus)); this.crystalReportViewer1 = new CrystalDecisions.Windows.Forms.CrystalReportViewer(); this.label1 = new System.Windows.Forms.Label(); this.SuspendLayout(); // // crystalReportViewer1 // this.crystalReportViewer1.ActiveViewIndex = -1; this.crystalReportViewer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.crystalReportViewer1.Dock = System.Windows.Forms.DockStyle.Fill; this.crystalReportViewer1.Font = new System.Drawing.Font("Constantia", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.crystalReportViewer1.Location = new System.Drawing.Point(0, 0); this.crystalReportViewer1.Name = "crystalReportViewer1"; this.crystalReportViewer1.SelectionFormula = ""; this.crystalReportViewer1.Size = new System.Drawing.Size(824, 572); this.crystalReportViewer1.TabIndex = 0; this.crystalReportViewer1.ViewTimeSelectionFormula = ""; this.crystalReportViewer1.Load += new System.EventHandler(this.crystalReportViewer1_Load); // // label1 // this.label1.AutoSize = true; this.label1.BackColor = System.Drawing.SystemColors.ButtonFace; this.label1.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label1.ForeColor = System.Drawing.SystemColors.HotTrack; this.label1.Location = new System.Drawing.Point(355, 6); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(182, 19); this.label1.TabIndex = 4; this.label1.Text = "Tenants Rent expiring lists"; this.label1.Click += new System.EventHandler(this.label1_Click); // // reportrentstatus // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.Bisque; this.ClientSize = new System.Drawing.Size(824, 572); this.Controls.Add(this.label1); this.Controls.Add(this.crystalReportViewer1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "reportrentstatus"; this.Text = "Lease Expiring Report"; this.Load += new System.EventHandler(this.reportrentstatus_Load); this.ResumeLayout(false); this.PerformLayout(); } #endregion private CrystalDecisions.Windows.Forms.CrystalReportViewer crystalReportViewer1; private System.Windows.Forms.Label label1; } }
Error 1 'rentalMaster.reportrentstatus.Dispose(bool)': no suitable method found to override
the reportrentstatus.cs has crystal report, this error is coming after i changed the crystal report property build action:content, and copy to output directory: copy always, i did this beause i want to publish to clickonce deployment.
can u help me in avoiding this error. thanks




Reply With Quote