我遵循本文檔中的說明link。 xtrareport顯示框的工具欄,但它不顯示任何數據。我究竟做錯了什麼?XtraReport未顯示任何數據
在我HomeController.cs
public ActionResult Index()
{
ViewBag.Message = "Welcome to DevExpress Extensions for ASP.NET MVC!";
ViewData["Report"] = new DXApplication.Reports.XtraReport1();
return View();
}
public ActionResult DocumentViewerPartial()
{
ViewData["Report"] = new DXApplication.Reports.XtraReport1();
return PartialView("DocumentViewerPartial");
}
public ActionResult ExportDocumentViewer()
{
return DevExpress.Web.Mvc.DocumentViewerExtension.ExportTo(new DXApplication.Reports.XtraReport1());
}
DocumentViewerPartial.cs
**@Html.DevExpress().DocumentViewer(settings =>
{
settings.Name = "DocumentViewer";
settings.Report = (DXApplication.Reports.XtraReport1)ViewData["Reports"];
settings.CallbackRouteValues = new { Controller = "Home", Action = "DocumentViewerPartial" };
settings.ExportRouteValues = new { Controller = "Home", Action = "ExportDocumentViewer" };
}).GetHtml()**
而且Index.cshtml由DocumentViewerPartial.cs 0123改變
{
ViewBag.Title = "Home Page";
}
@ViewBag.Message
@Html.Action("DocumentViewerPartial")