예제 #1
0
        public CarsReportForm(SqlConnection connection)
        {
            InitializeComponent();

            DataTable carsData = CarRentalDbWorker.GetCarsReport(connection);


            ReportDataSource dataSource = new ReportDataSource("CarsReportData", carsData);

            CarsReportViewer.LocalReport.DataSources.Add(dataSource);
            CarsReportViewer.LocalReport.ReportEmbeddedResource = "CarRentDBApp.CarsReport.rdlc";
            CarsReportViewer.RefreshReport();

            Show();
        }