Results 1 to 2 of 2

Thread: [RESOLVED] I need help!

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2008
    Posts
    92

    Resolved [RESOLVED] I need help!

    I'm not sure why I'm getting the error message:

    The type or namespace name 'ReportFair' does not exist in the namespace 'ConcessionsApplication' (are you missing an assembly reference?)

    Here is my code:
    HTML Code:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    using System.Data.SqlClient;
    using ConcessionsLibrary;
    using CrystalDecisions.CrystalReports.Engine;
    using CrystalDecisions.Shared;
    
    
    namespace ConcessionsApplication
    {
        public partial class frmReportFairs : Form
        {
            public frmReportFairs()
            {
                InitializeComponent();
            }
    
            private void frmReportFairs_Load(object sender, EventArgs e)
            {
                SqlConnection connection = ConcessionsDatabase.GetConnection();
                connection.Open();
    
                string selectStatement
                    = "SELECT * "
                    + "FROM Revenue";
    
                SqlDataAdapter myDataAdapter = new SqlDataAdapter(selectStatement, connection);
                DataSet fairDataSet = new DataSet();
                myDataAdapter.Fill(fairDataSet, "Fairs");
                connection.Close();
    
                ReportFairs report = new ReportFairs();
                report.SetDataSource(fairDataSet.Tables["Fair"].DefaultView);
                crystalReportViewer.ReportSource = report;
                crystalReportViewer.Show();
            }
        }
    }
    What am I doing wrong??

  2. #2
    Frenzied Member
    Join Date
    Jul 2008
    Location
    Rep of Ireland
    Posts
    1,380

    Re: [RESOLVED] I need help!

    This line:

    Code:
    ReportFairs report = new ReportFairs();
    Where is ReportFairs declared?

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