错误 CS0234 命名空间 'Microsoft' 中不存在类型或命名空间名称 'Reporting'(是否缺少程序集引用?)

Error CS0234 The type or namespace name 'Reporting' does not exist in the namespace 'Microsoft' (Are you missing an assembly reference?)

我下载了这个项目和数据库,但是当我 运行 我得到这个错误,你能帮我解决这个问题吗?非常感谢您的帮助。

附上源码和数据库,请看。 https://gofile.io/d/9TZvQV 谢谢!

enter image description here

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using Microsoft.Reporting.WinForms;

namespace DBApplication
{
    public partial class frmBilling : Form
    {
        SqlConnection con;
        SqlDataAdapter da;
        SqlCommand com;
        SqlDataReader dreader;
        DataSet ds;
        DataTable dt;
        DataRow dr;
        string sql;
        int quantity;
        ReportDataSource rds;
        ReportParameterCollection repParams;
        public frmBilling()
        {
            InitializeComponent();
            string constr = ConfigurationManager.ConnectionStrings["constr"].ToString();
            con = new SqlConnection(constr);
            loadCategory();
        }

        private void loadCategory()
        {
            sql = "SELECT CategoryID,CategoryName FROM Categories";
            da = new SqlDataAdapter(sql, con);
            ds = new DataSet();
            da.Fill(ds, "Categories");
            dt = ds.Tables["Categories"];
            dr = dt.NewRow();
            dr[0] = "-1";
            dr[1] = "--Select Category--";
            dt.Rows.InsertAt(dr, 0);
            cmbCategory.DisplayMember = "CategoryName";
            cmbCategory.ValueMember = "CategoryID";
            cmbCategory.DataSource = dt;
        }

根据Michael的建议和我对你项目的测试,请安装-nuget package Microsoft.Reporting.WinForms.v11来解决你的问题。