reportviewer控件mysql,可以在ASP.net Core中使用Reportviewer控件

I want to make use of the Reporting Services ReportViewer control in an ASP.NET Core MVC project.

The solution as proposed in other answers it to add a webform to the project.

However since ASP.NET Core doesn't support webforms I cannot add the control to a webform.

Is there any other workaround that might possibly assist me in using the ReportViewer control in an ASP.NET Core Web application?

解决方案

Update 2019

I have ReportViewer working on ASP.NET Core on Windows, and most features (not PDF and Images/PowerPoint) also work on ASP.NET Core on Linux.

There's still some bugs to weed out, though.

You can learn more about it in this github issue.

I can't release it publicly, because ReportViewer has a rather constricting license...

It is based on the AspNetCore.Reporting nuget by amh1979.

You might try the wrapper nuget around ReportExecution.asmx, also by amh1979, this has no licensing issues, but it's no real ReportViewer.

Original post:

No, you can't.

Microsoft is only just evaluating creating a .NET Core ReportViewer control.

Which means there isn't any at present (05/2017).

There also isn't any ReportViewer "control" for ASP.NET MVC.

There is only alanjuden's wrapper around MS-ReportServer's ReportExecution.asmx.

But that isn't the same. That will still require Windows Authentication on the report server (along with user-must-be-member-of-specific-ad-group), and a SSRS server running on Windows.

If you anyway have an SSRS-ReportServer on Windows, you're much better of embedding SSRS ReportViewer.aspx in an iframe. You might want to add forms-authentication to your reportserver. Also, if it needs to be cross-platform (=cross-browser = non-IE), you need SSRS >= 2016 (cross-browser not available in SSRS 2005/2008R1/2008R2/2012/2014).

If you're on Windows and don't want (your customer) to have to install a specific version of SSRS (which means you have to license a MS-SQL-Server), you can create a .NET non-core web application on IIS (on the same domain), and share the auth-cookie. Then you embed that ReportViewer from the IIS .NET non-core application via iframe (or link with target=_blank) in your .NET Core Web-Application. That way you don't require an SQL-Server license, and no MS-SQL-Server if you, for example, use MySQL/PostgreSQL/Oracle.

Other than wait, you can bundle Apache Tomcat with BIRT into your application, and use Launch4J to redistribute it with the JRE. Then you'll just have to use the Eclipse-BIRT ReportDesigner to create BIRT reports (non-SSRS-reports).

Or you can embed JasperReports with JasperServer.

This would be far more difficult to bin-deploy than BIRT.

But I guess docker to the rescue.

Jasper and BIRT have the advantage that they also run on Linux/Mac.

However, that means you either need the JRE installed on the server, or bin-deploy the JRE along with your application.

Jasper's advantage over BIRT is that it is faster, and that it supports vertical text (not just in the web, and vertical-text is not rendered as image).

There usually are always issues with the BIRT releases downloaded from their website that prevent running BIRT at first. Be that a missing JAVA_HOME environment variable, a missing .jar-dependency or an invalid signature in a .jar file. For information on what it will be on your machine at your time, consult the TOMCAT logfiles, and then google the problem.

The nice thing about BIRT is, that it's comparatively easy to bin-deploy.

Another option would be jsReports, if you like nodeJS.

However, Bin-Deploy that without installation and complications will be even harder (PhantomJS, Webkit, wkHtmlToPdf - for example with an ARM-processor on Raspberry PI).

If you have a few years to spare, you can also just wait until the SSRS team ports to .NET Core - if that happens at all, that is.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值