Example #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?Date, int?CategoryId)   // id để report with
 {
     ViewBag.StoreId     = StoreId;
     ViewBag.WarehouseId = WarehouseId;
     ViewBag.CategoryId  = CategoryId;
     ViewBag.Date        = Date;
     ViewData["Report"]  = new BaoCaoTonKhoOnHandXtraReport();
     return(PartialView());
 }
Example #2
0
        private BaoCaoTonKhoOnHandXtraReport CreateDateReport(int StoreId, int?WarehouseId, DateTime?Date, int?CategoryId)
        {
            BaoCaoTonKhoOnHandXtraReport report = new BaoCaoTonKhoOnHandXtraReport();
            DataSet ds = GetData(StoreId, WarehouseId, Date, CategoryId);

            report.DataSource = ds;
            // Lặp lại Detail
            report.DataMember = "Detail";
            // Export file Name
            report.Name = "Báo cáo tồn kho";
            return(report);
        }
Example #3
0
        public ActionResult ExportReportViewerPartial(int StoreId, int?WarehouseId, DateTime?Date, int?CategoryId)
        {
            BaoCaoTonKhoOnHandXtraReport quarterReport = CreateDateReport(StoreId, WarehouseId, Date, CategoryId);

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