Results 1 to 4 of 4

Thread: Dispose(bool)': no suitable method found to override

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2007
    Posts
    208

    Dispose(bool)': no suitable method found to override

    I am developing windows application using C# and Ms sql.
    here is my code
    Code:
    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)
            {
    }
    here is the designer code
    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;
        }
    }
    when i run this it gives me this error:
    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

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Dispose(bool)': no suitable method found to override

    You don't have another type named Form do you?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2007
    Posts
    208

    Re: Dispose(bool)': no suitable method found to override

    sorry my english poor,what do u mean?

  4. #4
    Fanatic Member AceInfinity's Avatar
    Join Date
    May 2011
    Posts
    696

    Re: Dispose(bool)': no suitable method found to override

    What does your other reportrentstatus class look like also? Not the one in this designer view*
    <<<------------
    Improving Managed Code Performance | .NET Application Performance
    < Please if this helped you out. Any kind of thanks is gladly appreciated >


    .NET Programming (2012 - 2018)
    ®Crestron - DMC-T Certified Programmer | Software Developer
    <<<------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width