asp.net-mvc-3 - RDLC 报告与 ASP.net MVC 3.0

标签 asp.net-mvc-3 rdlc

我正在尝试在我的 MVC 3.0 应用程序中为 RDLC 报告添加业务对象数据源。但是,它不允许我向我的应用程序添加对象数据源。

如何将对象数据源添加到我的 RDLC 报告中?

最佳答案

只需添加一个具有您在标准 WebForms 应用程序中所需的所有功能的 aspx 页面。您只需要为其添加一条路线。这是一个可能会满足您需求的示例:

public static void RegisterRoutes(RouteCollection routes)
{
    // ...
    // Some MVC routes
    // ...

    //Custom route for reports
    routes.MapPageRoute(
       "ReportRoute",                  // Route name
       "Reports/{reportname}",         // URL
       "~/Reports/{reportname}.aspx"   // File
    );
}

关于asp.net-mvc-3 - RDLC 报告与 ASP.net MVC 3.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8570953/

相关文章:

c# - 向 UI 公开数据库 ID

asp.net-mvc - 如何使用 Action 和 Controller 名称获取 ActionDescriptor

c# - RDLC 报告的默认字体

asp.net-mvc - 将 rdlc 报告渲染为 PDF 在 Azure 网站上不起作用

C# .rdlc Report Viewer 在打印时在右侧添加空白

C# Base64 字符串可以转换为图像,但不显示在 .rdlc 图像控件中

c# - Razor 引擎对我的内联代码不满意

jquery - 多次验证器调用使用不显眼的方式动态添加内容

c# - 我的循环选择列表中的 MVC 3 Controller 语法错误

c# - 如何使用编码运行 rdlc