dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
34.59k stars 9.78k forks source link

Asp.Net Core Reporting (SSRS) #1528

Closed KerolosMalak closed 4 years ago

KerolosMalak commented 8 years ago

I am working on ASP.NET Core app and cannot find a solution for displaying SSRS reports. With the absents of "Microsoft.Reporting.WebForm" no longer works. What is the best practice for displaying SSRS reports on the web in ASP.NET Core

MaximRouiller commented 8 years ago

With Core still being in RC (RTM by the end of the month), I don't think that an SSRS scenario is planned within the next 6 months but I'm not part of the team.

I would either generate those reports on the client side by using some javascript libraries or pre-generate those reports.

If you need something more "integrated", you can check out this community package:

https://github.com/ilich/MvcReportViewer

By the look of the issue https://github.com/ilich/MvcReportViewer/issues/121, they are interested in integrating it but with no success thus far.

mmgafri commented 7 years ago

I don't understand why the dotnet and ASP.net core initiatives are keeping silent on this issue on all previous announcements. It is like [Reporting is not a major concern for developers and they can deal with it using html and print css classes] currently we are migrating a small erp with alot of ssrs rdlc files and css approach is not doing any good in cross browsers reporting. on the other hand, past week microsoft released ssrs 2016 with pure html5 viewer that eliminated the need for activex installation [which was the only downside for using ssrs on non-ie browser] ssrs 2016 viewer fit perfectly in asp.net core eco system perfectly but no official statement regarding asp.net core support was declared.

is it all blocked by System.Drawing?? because even itextsharp hadn't release a library until now. if it is System.Drawing then at least windows implementation can be completed before [linux and OSX] in order to increase adoption for current windows developer instead of waiting for the full cross-platform implementation for System.Drawing

I hope this post will make the team reconsider some priorities to enable ssrs within asp.net core

with respect for MvcReportViewer mentioned in previous post (it is a wrapper around webforms viewer) and it helped alot of mvc developers in the past to overcome the lack of mvc report viewer in mvc1 to mvc5 [Thanks so much ilich], I hope to see a full solution because ssrs was not a first class priority and people kept quite about it in pre-core mvc.

mmgafri commented 7 years ago

Please developers, forward this issue to your colleagues in order to comment about it. this might give a priority for it and motivate the team to do something.

MaximRouiller commented 7 years ago

@ddddddddeee22211 It's a V1.

You don't ship with SSRS support initially. The support with SSRS would probably come from the SSRS team and not the .NET team. Since we're not even out of RC yet, I don't see this as a critical feature in V1.

If you need to do reports, may I recommend just running the webforms version? Yeah. It's old. But at least it works and it's supported.

If you need X-Plat reports, I'll recommend something like Chartist. It allows you to generate charts directly on the client. Add a CSS file for printing purposes and boom. You have reports that can be printed.

mmgafri commented 7 years ago

from your perspective it might not be critical but some other developers are considering it very important for their projects because once they develope an app and go live with it, development tasks get holded and reporting tasks become daily routine tasks. also some projects handle reports creation to BI (business intelligence) team who knows how to use ssrs but dont have an idea about asp.net core.

the aim of my post was to understand ssrs position within asp.net core eco system. or if it will be ignored as in mvc1 to mvc5. ssrs team are within microsoft and asp.net core team may discuss the issue with them. what drove me crazy was when i saw ssrs 2016 release note past week without mentioning anything about asp.net core. while on the other hand you see continous support for azure within asp.net core.believe me if we didn't rise a demand for ssrs, it will be ignored as in the previous mvc 5.

your advice about using webforms is an example about slowing down adoption of core initiative.at least if I had a statement about wether it will be supported or not , I'll be able to make strategic decisions about it.

thanks for chatist tip. I'll check it out and I hope you understood my point of view.

MaximRouiller commented 7 years ago

@ddddddddeee22211 Ahhh... then I can't answer.

Right now, the only way to make SSRS components work on ASP.NET is on WebForms.

If you want their strategic position or if they will support it, we'll need to wait for an MS Employee to answer.

Maybe we can /cc @coolcsh ? He might not answer here but a blog post clarifying the position would be nice.

jtarquino commented 7 years ago

In the SSRS team we are aware of the limitations of the ASP.NET WebForms and we are actively investigating and working in new options for the Report Viewer control Thanks

MaximRouiller commented 7 years ago

@jtarquino

Thanks for the reply man!

We've been wanting an alternative since MVC. :stuck_out_tongue_winking_eye:

mmgafri commented 7 years ago

That just made my day. [~happy ending~] Thanks @jtarquino , @MaximRouiller for all effort.

boemark commented 7 years ago

@jtarquino That sounds great :-)

Can you say anything about when you expext to release first version of the "new option" for Report Viewer Control ? (Are there any roadmap/plan for this?)

Br. Boe

jtarquino commented 7 years ago

Unfortunately I don't have a timeline to share at the moment

bethwellagat commented 7 years ago

have you tried using a Library by installing a Package on Package Manager Console and type following command into command window.

PM> Install-Package ReportViewerForMvc although i have tried on web-forms and they look pretty good.

untitled

KerolosMalak commented 7 years ago

@bethwellagat again fire error "the dependency ReportViewerForMvc doesn't support framework .NetCoreapp" notes: working on ASP.NET Core project

Eilon commented 7 years ago

@jtarquino ping on this. Looks like there's more interest: https://github.com/aspnet/Mvc/issues/5332

Eilon commented 7 years ago

@jtarquino BTW if you want to start some discussions with my team, please email me and we can chat.

MaximRouiller commented 7 years ago

Ohhh me like! The ball is rolling! šŸ˜€

alanjuden commented 7 years ago

Hey everyone, I just finished writing a custom port of the report viewer control using the ReportExecutionService.asmx that's built into SSRS and I was targeting ASP.NET MVC. I had someone suggest porting it to .NetCore & MVC so I have completed that. Give it a try and let me know what you guys think: https://github.com/alanjuden/MvcReportViewer

Alan

wqwalter commented 7 years ago

It looks like it has been about three months since ReportViewer in ASP Netcore MVC has been discussed here. I am working with the version Alan Juden has provided in a project I am moving from WinForms to netcore. Is there any signs Microsoft is stepping up to provide first class SSRS ReportViewer support or have they put SSRS in the same closet they put Visual FoxPro into a few years back?

Prost98 commented 7 years ago

Any progress MS? Best option for now is to use a third party tool like Telerik Reports for browser rendering and SSRS backend for report subscriptions. Maybe as ddddddddeee22211 wrote, SSRS 2016 already has capability via HTML5 rendering engine but no documentation exists?

MaximRouiller commented 7 years ago

Hey @Eilon.

Any news since September? Especially since you guys now launched 1.0 (congrats!), pressure must be down a bit.

Anything you can share?

/cc @jtarquino

jtarquino commented 7 years ago

Nothing that I can share yet, as soon I have news for .NET core you will be the first one to know. As you mentioned we just released the latest nuget for the ASP.NET Webforms and Winforms control

bcsmith100 commented 7 years ago

I would like to add my prompt to the team as well... This is a major issue. I appreciate AlanJuden's solution, but we need an "official" solution... Given that core 1 has been out for months now it would be helpful to have some word on the status of this. If you could get us word on the timeline for a solution that would be something. This issue is large enough that it will prevent us from using mvc core. One note. We really need a solution that gets around the need for the users to log into the ssrs server. This is why my project has to use the current reportviewer (using reportviewer we have the mvc project provide a standard login to the ssrs server for all users)

mmgafri commented 7 years ago

Sql server 2017 is community preview2 now And .net standard 2.0 release is close with the latest announcement And still no word on native asp.net core reporting service viewer Please invite other developers to this issue to give feedback and make the team aware of the need for such an effort for a masterpiece framework that every developer is dreaming about.

figuerres commented 7 years ago

@jtarquino : is there a forum or uservoice for SSRS ? how can users contact the SSRS team ?

jtarquino commented 7 years ago

Yes the forum is https://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=sqlreportingservices also you can check our blog https://blogs.msdn.microsoft.com/sqlrsteamblog/

figuerres commented 7 years ago

Thanks , Iā€™d really like to get some help with getting my new app to work with SSRS. Is there any way to get the code used by the web forms control for an aspx page to tear into ? Iā€™d like to see if I can make an angular 2 view that ā€œworks likeā€ and ā€œlooks likeā€ the web forms control.

timClyburn commented 7 years ago

Hi,

We are looking to migrate some of our websites etc to asp.net core but some include an SSRS Report Viewer Control. Is there any progress on a report viewer control for .net core?

Thanks Tim

ikourfaln commented 7 years ago

if you are targeting Full .NET 4.x and not .NET Core, please take this #2022 in consideration before moving to ASP.NET Core. ASP.NET Core 2 will not support Full .NET 4.x

giddev commented 7 years ago

@ikourfaln. Rather a moot point a this stage seeing there is no reportviewer in asp.net core to break. With the upcoming changes in Q3 in asp.net core 2 as well as .net standard 2 with the compatibility shims that allow targeting the .net framework, I would think it's highly unlikely that Microsoft will write a reportviewer for the current asp.net core 1.1.

figuerres commented 7 years ago

currently i have tried to get into the auth extensions for SSRS and found it to be a real mess to try and change, you can put in a new auth / login but then when you try to enable CORS so that a web app can call SSRS to run a report the browser can't get an OPTIONS preflight request to work and that ends that whole idea.

so now i am making a web forms web app that i am adding OpenId Connect support to so that i can have SSO working between my shiny new angular app and my reports

then i will see if i can some how bring them together with iframes hackery or some other means.

wish microsoft would update ssrs to play better with new web tech.

figuerres commented 7 years ago

another line of thought: SSRS KPI and Mobile reports: is there any way to use them in a web app ??

IonRobu commented 6 years ago

@alanjuden Any chance to configure your package to enable rdlc reports rendering? Installing Reporting Server and manage it for each client is a real pain.

alanjuden commented 6 years ago

@IonRobu, I may be crazy...but I'm not that crazy! :P

The real reason that I won't do that is because I have only made the front end viewer of the report viewer. I'm relying entirely on SSRS to render the report and give me back the report data via the SSRS API. So it requires having the report server backend. Sorry but that would be way more work than I'm looking to do on this project. I created my MvcReportViewer as an easy solution to get around the pains of bringing in the ASP.NET WebForms version of the control in.

figuerres commented 6 years ago

Report Server or RDLC which is called "client reports" report server is more work to setup and manage yes that is true. but it has a number of benefits:

reports are rendered on a back end server, that takes work load off the front end web servers. the results of a report can be cashed and that can take work load off your productions sql server. complex reports can be run on a schedule and do work at a time when few users are on the system and requests can then be served up from that pre-compiled snapshot. also using SSRS the sql server connection strings stay on the report server and do not need to be managed in the web server config file also the SSRS server becomes a central point that report authors can publish to and all users can get the reports from the server. SSRS can setup automatic emailing of reports to users, you can email a link to the report server for some users and a pdf, word or excel file to others.

also scaling up, if you need to serve more users you may need to add more web servers before you need more report servers, you do not then need to copy large numbers of rdlc files to all the web servers.

so yeah if you only have a few reports and do not need any of the benefits you can go with rdlc. but for a larger system that will need to serve a lot of reports to a lot of users the SSRS server has some really good benefits. also that SSRS api is very powerfull to work with, you can call the api to return a report pdf for example without the need to have any client side web forms or mvc viewer controls. the api can also manage the reports, upload them to the server, set permissions and list the reports. at work i am using the api to allow our client app to list the reports that the user can run, to check the parameters the report needs and then run the report for the user.

so take a good look at the benefits not just at the admin overhead.

mmgafri commented 6 years ago

@figuerres Client reports excel in different context from the one you descriped Many clients does not use report server and do not have qualified personnel to administer and maintain its issues Also when you ship a product with customized reports (60+) for each client you face an overhead of deploying application + deploying reports Many users are not techies who can understand reports generated by server and rendered as per response without previewing them first (invoice for example can be verified via viewer easily than downloading multiple corrected invoices into different tabs)

As you can see it is a easy for user to adapt to simple report viewer than complex scenarios Also developed spent countless effort to develop clients reports and now they are rendered useless in their true usage

I hope Microsoft team understand our pain

figuerres commented 6 years ago

Not quite sure I get all of what you said but yes client reports are usefully, I was just outlining reasons for the server , why it might be worth looking at. Your mileage may vary and all that.

mmgafri commented 6 years ago

today net standards 2 is released with more api surface for system.drawing could this be a chance for a word from srss team about ssrs viewer for asp.net core?

Erwinvandervalk commented 6 years ago

My company heavily relies on RDLC reports export documents in PDF format. Not being able to do this in .net core is basically a blocker to us using .net core and running on other platforms like docker.

mmgafri commented 6 years ago

i hope from every coder to encourage his/her colleagues to comment on this issue here

ststeiger commented 6 years ago

For those that are still looking for a solution: If Java is installed, you could alternatively embed Eclipse BIRT or JasperReports. Of the two, JasperReports is most definitely the best SSRS alternative (a little more complicated, but also a lot more powerful / pixel-perfect ). It has a stand-alone and embeddable reporting server, capable of accessing any JDBC datasource, and also BigData like Cassandra or Apache Spark (SparkSQL).

It provides reporting and analytics that can be embedded into a web or mobile application as well as operate as a central information hub for the enterprise by delivering mission critical information on a real-time or scheduled basis to the browser, mobile device, or email inbox in a variety of file formats.

You could do a self-contained deployment of the Java runtime by supplying BIRT/Jasper via Launch4j.

k11k2 commented 6 years ago

@jtarquino any good news for .Net Core ?

psheldon commented 6 years ago

I can't believe this is still an issue some 15 months after it was raised. Very disappointed.

cgountanis commented 6 years ago

We really need this to work, even a simple point at SSRS, ReportName and Params, open in DIV or something. We have invested a lot of time in creating SSRS reports on SQL directly and I need a way to display them in a simple Core2.0 MVC application.

Any tips?

ctrl-brk commented 6 years ago

@cgountanis, This works for me: https://github.com/aspnet/Home/issues/1528#issuecomment-259169426

figuerres commented 6 years ago

@cgountanis do you need a pdf of the report or full interactive reports like the web portal shows ??

i can give you some starters on how i do them from an angular app

steelwil commented 6 years ago

This is what I am doing. Uses the client's credentials which may not work for most. Resizing the page larger works, making it smaller not.


@model string

@{
    ViewData["Title"] = "View Report";
}

<style>
    body {
        overflow-x: hidden;
    }
</style>

@{
    var src = "http://192.168.0.1/ReportServer/Pages/ReportViewer.aspx?/";
    src += ViewData["argument"];
}

<iframe style="overflow:hidden; overflow-x:hidden; overflow-y:hidden; border:none; width:100%; height: 1250px;" src=@src></iframe>
figuerres commented 6 years ago

one thing is to use the report server web services, from them you can get lists of the reports and folders and data sources etc... and use that data to build your own portal / report menus and manage which reports the users can see in your app. we created a set of windows users on the report server and used them to limit which reports they get, mapped the application users role to a report server user.

when we run a report we pass the report server user as the user who is running the report, kind of sucks as that means we lose the "real user" unless we log that in our code. but that deals with the report server's dependence on windows user accounts. if they would updated it to use a jwt token and get roles from the token things would be better for us.

we use an iframe to put the web forms control into an angular app view, also not the best but it works. the user can't really see the behind the scene hacks we do.

cgountanis commented 6 years ago

@ctrl-brk I am having this issue with Core 2.0, maybe I missed something. https://github.com/alanjuden/MvcReportViewer/issues/43

@steelwil Thanks but I need custom NetworkCredential.

@figuerres We display reports from a firewalled SSRS, the WebForm application did all the hard work with the SSRS.ReportViewer, not able to just Windows Users. Agreed JWT would be nice though. Examples would be cool, trying to match the ReportViewer functionality that we had with WebForms/NUGET.

Thanks all!

cgountanis commented 6 years ago

Eventually they will release an official NUGET for this right?

giddev commented 6 years ago

@cgountanis The "they" is the SQL Server team, not the ASP.NET Core team. Therein lies the problem. It's a different team.