コード例 #1
0
 //2. PartialView Report lại trả về action ReportViewerPartial và khởi tạo mới Report
 public ActionResult ReportViewerPartial(int StoreId, DateTime?FromDate, DateTime?ToDate)  // id để report with
 {
     ViewBag.StoreId    = StoreId;
     ViewBag.FromDate   = FromDate;
     ViewBag.ToDate     = ToDate;
     ViewData["Report"] = new BaoCaoThuChiTheoNgayXtraReport();
     return(PartialView());
 }
コード例 #2
0
        private BaoCaoThuChiTheoNgayXtraReport CreateDateReport(int StoreId, DateTime?FromDate, DateTime?ToDate)
        {
            BaoCaoThuChiTheoNgayXtraReport report = new BaoCaoThuChiTheoNgayXtraReport();
            DataSet ds = GetData(StoreId, FromDate, ToDate);

            report.DataSource = ds;
            // Lặp lại Detail
            report.DataMember = "Detail";
            // Export file Name
            report.Name = "Báo cáo xuất nhập tồn";
            return(report);
        }
コード例 #3
0
        public ActionResult ExportReportViewerPartial(int StoreId, DateTime?FromDate, DateTime?ToDate)
        {
            BaoCaoThuChiTheoNgayXtraReport quarterReport = CreateDateReport(StoreId, FromDate, ToDate);

            return(DevExpress.Web.Mvc.ReportViewerExtension.ExportTo(quarterReport));
        }