【发布时间】:2020-10-27 12:36:27
【问题描述】:
我在前端使用 Angular 10,在后端使用带有存储库模式的 .net 核心 webAPI。我正在尝试使用 DevExpress(v20.1) 报告。但我无法弄清楚如何制作它。我正在搜索它一个星期,但没有结果。 This page 和 this page 解释了它。但是我不知道如何配置这部分代码;
public class ReportDesignerController : Controller {
//...
public ActionResult GetReportDesignerModel(string reportUrl) {
string modelJsonScript =
new ReportDesignerClientSideModelGenerator(HttpContext.RequestServices)
.GetJsonModelScript(
reportUrl,
GetAvailableDataSources(), //this metod implemented
"DXXRD",
"DXXRDV",
"DXXQB"
);
return Content(modelJsonScript, "application/json");
}
}
谁能告诉我如何正确配置“DXXRD”、“DXXRDV”、“DXXRDV”。我没有使用 mvc,所以当我用这个替换代码时;
new ReportDesignerClientSideModelGenerator()
.GetJsonModelScript(
reportUrl,
GetAvailableDataSources(),
"ReportDesigner/Invoke",
"WebDocumentViewer/Invoke",
"QueryBuilder/Invoke" .
);
我必须使用 MVC 才能调用这些控制器和视图。但我没有使用mvc。在我现在的位置上,我开始认为如果没有 MVC,我将无法实现这一目标。所以;
- 是否可以在像我这样的项目中使用 DevExpress 报告?
- 如果是怎么办?
【问题讨论】:
标签: c# angular report devexpress asp.net-core-webapi