private PhieuNhapKhoXtraReport CreateDateReport(int?StoreId, DateTime?ToDate, DateTime?FromDate, int?SupplierId, int?EmployeeId) { PhieuNhapKhoXtraReport report = new PhieuNhapKhoXtraReport(); DataSet ds = GetData(StoreId, ToDate, FromDate, SupplierId, EmployeeId); report.DataSource = ds; report.DataMember = "Detail"; // Lặp lại Detail string orderid = StoreId == null ? "" : StoreId.ToString(); report.Name = "Phieu nhap kho -" + StoreId; // Export file Name return(report); }
public ActionResult ExportReportViewerPartial(int?StoreId, DateTime?ToDate, DateTime?FromDate, int?SupplierId, int?EmployeeId) { PhieuNhapKhoXtraReport quarterReport = CreateDateReport(StoreId, ToDate, FromDate, SupplierId, EmployeeId); return(DevExpress.Web.Mvc.ReportViewerExtension.ExportTo(quarterReport)); }
// // GET: /StockInReport/ public ActionResult ReportViewerPartial(int?StoreId, DateTime?ToDate, DateTime?FromDate, int?SupplierId, int?EmployeeId) // id để report with { CreateViewBag(StoreId, ToDate, FromDate, SupplierId, EmployeeId); ViewData["Report"] = new PhieuNhapKhoXtraReport(); return(PartialView()); }