Example #1
0
        private void button_Click(object sender, RoutedEventArgs e)
        {
            report.Reset();

            ReportDataSource ds = new ReportDataSource("dataset", DataReport.MonthlyRevenue(cbxMonth.SelectedValue.ToString(), cbxYear.SelectedValue.ToString()));

            report.LocalReport.DataSources.Add(ds);

            report.LocalReport.ReportEmbeddedResource = "QLPhongKhamTuNhan.GUI.UIReport.reportMonthlyRevenue.rdlc";

            ReportParameter rp = new ReportParameter("txtMonth", "Tháng: " + cbxMonth.SelectedValue + "/" + cbxYear.SelectedValue);

            report.LocalReport.SetParameters(new ReportParameter[] { rp });

            report.ZoomMode = ZoomMode.PageWidth;

            report.RefreshReport();
        }