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

            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, int?WarehouseId, DateTime?FromDate, DateTime?ToDate, int?CategoryId)
        {
            BaoCaoXuatNhapTonXtraReport quarterReport = CreateDateReport(StoreId, WarehouseId, FromDate, ToDate, CategoryId);

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