【问题标题】:how to use SSRS report in ASP.NET Boilerplate? Could you please share some examples?如何在 ASP.NET Boilerplate 中使用 SSRS 报告?你能分享一些例子吗?
【发布时间】:2017-09-20 12:34:09
【问题描述】:

我想在我的 Boiler Plate 应用程序中使用 SSRS 报告。为此,我无法添加 Web 表单以包含 RDLC 报告的报告查看器。你能分享一些例子吗?

【问题讨论】:

    标签: aspnetboilerplate


    【解决方案1】:

    如果您只需要添加一个新的 asp.net Web 表单,那么在 MVC 项目中可以添加一个新的 aspx 页面。

    由于 .aspx 文件不使用 Razor,并且您不能告诉它使用 _Layout 页面..所以您需要布局 html。

    如果你也想查看用户权限,可以看下面的示例代码;

    public partial class CrystalReportViewer : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IocManager.Instance.IocContainer.Resolve<IPermissionChecker>().IsGranted("Pages.CrystalReports"))
            {
                throw new Exception("You are not authorized");
            }
    
            //Show report otherwise
        }
    }
    

    这里有关于这个问题的更多信息。你可以阅读它们

    http://www.codedigest.com/posts/3/adding-aspnet-webforms-into-aspnet-mvc-project-and-vice-versa

    How to add .aspx pages to existing MVC 4 project?

    https://www.linkedin.com/pulse/integrate-sap-crystal-reports-aspnet-mvc5-application-koutroumpas/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-03-10
      • 2018-07-09
      • 2020-08-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-07-30
      • 1970-01-01
      相关资源
      最近更新 更多