public static void Load_LocalReport(ReportViewer rp, Report_DTO resource)
        {
            //default set
            rp.LocalReport.DataSources.Clear();
            if (rp.ProcessingMode != ProcessingMode.Local)
            {
                rp.ProcessingMode = ProcessingMode.Local;
            }

            //handle rdlc
            rp.LocalReport.ReportPath = Helper_GUI.PathToReportSource + resource.RdlcFile;

            //handle parameter
            if (resource.ListPara != null)
            {
                rp.LocalReport.SetParameters(resource.ListPara);
            }

            //handle tablses
            resource.ListTable.ForEach(s => rp.LocalReport.DataSources.Add(s));

            //change width
            rp.ZoomMode = ZoomMode.PageWidth;

            //refesh
            rp.RefreshReport();
        }
Example #2
0
        private void btnDT_theothang_Click(object sender, EventArgs e)
        {
            int        month = cbxDT_thang.SelectedIndex;
            Report_DTO src   = null;

            switch (month)
            {
            case 0:
                src = ReporterBUL.Instance.UPD_DoanhThuTheoNam((int)cbxDT_nam.SelectedValue);
                break;

            default:
                src = ReporterBUL.Instance.UPD_DoanhThuTheoThang(month, (int)cbxDT_nam.SelectedValue);
                break;
            }
            Helper_GUI.Load_LocalReport(rp_Doanhthu, src);
        }
Example #3
0
        private void btnDT_theongay_Click(object sender, EventArgs e)
        {
            Report_DTO src = ReporterBUL.Instance.UDP_DoanhThuTheoNgay(dpDT_start.Value, dpDT_end.Value);

            Helper_GUI.Load_LocalReport(rp_Doanhthu, src);
        }