Alternative to RDLC files - c#

I have an application that uses .rdlc files to present data. The actual report documents are created in the application, and the data is always a single record (albeit from a fairly complex dataset), and there is never a need to manipulate the data once the report has been created. The reports are saved as PDFs so they can be reviewed and shared with customers.
The original application has been written in VS 2008, using the .NET 3.5 Framework; I have to upgrade to 4.7.2 but upgrading these reports seems way more painful than it should be.
My progress so far has been to create a new MVC solution, add the original Webforms pages to the project and linking back to those pages from the new development. I have added a Report project that I (currently) plan on using to create the reports in an effort to separate concerns, but I'm wondering if there is a decent alternative to this approach?

Related

Microsoft LocalReport (rdl) in ASP.NET Core MVC App

I am running a project with ASP.NET Core (2.1) MVC. In our company we do have a lot of work done with SQL Report Builder (rdlc and rdl files). Therefore we wanted to use a "one the fly" mechanism to generate PDF Files with the ReportBuilder technology in the asp.net core mvc webapp.
I tried the same nuget packages we are using in .net Framework (asp.net API and desktop app) but they are not working. The packages I tried are:
Microsoft.ReportingServices.ReportViewerControl.Winforms
Microsoft.ReportingServices.ReportViewerControl.Webforms
The problem there is that they are using System.Web which I cannot include in .net Core apps, do I?
I googled for any solution but did not find a lot of helpfull material. I am also ware of that Microsoft purchased a product to get the work done:
https://blogs.msdn.microsoft.com/sqlrsteamblog/2018/04/02/microsoft-acquires-report-rendering-technology-from-forerunner-software/
And I already read this article about a similar problem:
RDLC Local report viewer for ASP.NET Core and Angular(>2.0)
Do we have the wrong technology setup in mind or is this even not support at all. I found some other package (https://www.nuget.org/packages/AlanJuden.MvcReportViewer.NetCore/) which are working with html to render a report. But we really want to use the rdl files
Any informations and suggestions are greatly appreciated.
In the end we came up with a totally other approach.
We just created a new Application called "DocumentService" on .NET Framework running as a Service on a Windows Server. The service was checking a database if there are new jobs in the database queue and if so, it generates the pdf result and stores it in the database.
So the web application was not longer responsible for creating the pdf, it only added a new line in the database so mark that a new document should be created. The DocumentService app then generated the document and the web app could access the data in the database.
We can use this "DocumentService" in other part of our application landscape and therefore the effor was worth it. It app is also multithreaded and working pretty fast and well.
No you can't include System.Web. I had same problem and solved it with AspNetCore.Reporting. You can download this from NuGet. This can be useful: https://www.dotnetcurry.com/aspnet/844/aspnet-ssrs-reports-programmatically-html
Well, depends. If you want it inside your application, and don't mind generating the report in iframe it's possible. Or you can always open it in a new tab. Only problem is that you have to know the link to the report. I did it like that in my company's program. If you want to know more, just ask me, but officially ASP.NET Core doesn't support reporting

Charting tool that generate on memory

My question seems confusing but I'll let you explain it more clearly. Me and my team we're currently developing a complex report that comprises of words, tables and charts. As of now we generate this report by using a word document template and filling it up with the model we have. As for chart this is where it becomes complicated, we have two application that we're using in business one is a windows/wpf application and a web application. Both application uses the same engine we have for generating chart (ComponentOne) but the engine itself is only compatible for windows application. We use the assembly we generate from windows/wpf application on our web application for us to generate a report.
Our report generator on website will only have filter and parameters on what kind of report they want to generate and on a press of button. What do you think will be the best to tackle this issue so that we can drop using the assembly we have. We don't like to drop using template for this as these greatly help us on maintaining the report when changes is required the only thing that we think right now on how can we generate a chart on memory and convert it into an image so that we can dump it on our template.
It's not confusing, it's just not clear at all. If I get it right you just have a reporting tools ComponentOne that make reports on software side and it's not adapated for web side.
You somewhat tried to tackle it by using software dll in your website and it doesn't work as well as you expected/wanted. And you keep trying as of now.
Your question is basicly "How can I use a dll designed for software into a website?"
And the answer is simple. It's case by case when not outright impossible.
I invite you to look for another solution than using a software designed dll on a website. Even your idea of putting it inside an image is somewhat bad (lose of all controllers / defeat of the purpose of an interactive report.)
I'm pretty sure that ComponentOne would have think of such a problem as web reports and maybe even a solution to link web reports to soft reports. With a little search, I found a C1WebReport and even found some forums talking about C1Report to C1WebReport. Does it answer your problem?

DataSet related issues when using ReportVIewer

I'm new to reporting in VS 2010 and I'm trying to use integrated report viewer. My current understanding is that If my system has 10 reports I should create 10 DataSets so one DataSet per report. The problem is I want to organize these DataSets in the IDE. I have folders for each type of reports in the solution explorer and I want to move respective DataSets to such forlders.
But when it is moved to a folder list of errors are shown in the code and after realizing that the namespace names of the moved DataSets have been changed, I manually changed them to original namespaces but still I have problems like System.DataSet1DataAdapter not found, No fill method have been defined etc etc.
How to solve this problem? Otherwise is it better to keep DataSets in the root folder?
Could we create DataSets for reports in code? What is the practice in professional level?
Is integrated reporting considered a consistent way to do reporting?
NOT: I'm developing a Win forms application

Code generate new C# project

At the moment I am using C# T4 code generation, but as much as I know it is limited to a class file or other file type generation. I need to generate multiple projects in one solution is it possible to accomplish with T4 templates or there is other technique do to this?
Templates in Visual Studio allow for multiple projects / files templates so you can definitely create this.
The way to create them is simply to setup the skeleton you need for the project, then replace the content of the files in the directory with specific values that will be replaced when the template has the information needed.
I had similar experience.
I developed a whole set of T4 templates to generate a solution. But once you want change code in multiple files, some code may mess up.
So I wrote a code generator based on database schema to generate a VS solution with DAL(Linq To SQL, Entity Framework), BLL, WCF, and UI Applications MVC, WPF, Windows PHone, Windows App Store, Silverlight.
You can goto https://github.com/ntierontime/Log4Net to see whether it meets your architecture requirements, or not. And send me an email with the .dbml(Linq To Sql Classes).

Recommendation for report in asp.net

I'm developing a system in asp.net (webforms) where the users can log in and see their reports. I was using RDL from my reports, but now I wanna use another technology when reports be more dynamics, just like this:
http://ap.demo.qlikview.com/QvAJAXZfc/opendoc.htm?document=qvdocs/Plant%20Operations.qvw&host=Demo11&anonymous=true
But I need a free tech and this have to work with my project in asp.net. What could I use?
I've toyed with reporting systems like Crystal Reports or SQL Reports, and found them to have a learning curve, but also be rigid and inflexible, or generate horrid HTML.
ASP.NET MVC can be used as a great reporting system, here's how:
Optionally use a VirtualPathProvider to allow you to store your MVC .aspx files in a database.
Have a Controller class with an action "GenerateReport" that only creates an EF Context / Repository object or even a raw database connection and passes that as an object to the view, there is no other model.
Break the rules of MVC "no data-access logic in the view"! Your view (in the .aspx file) should have a <% %> area that does all of the report-generation logic by running queries and stuff.
For graphs and charts and stuff, use a RESTful chart generation library, you can also write your own. This basically means that instead of the report generating a static image file and storing it somewhere and putting the path in an <img src=""> element, it instead does this: <img src="RestfulImage.ashx?line1={1.2,4.6,8...." />. Google actually has a service you can use: https://developers.google.com/chart/image/docs/making_charts
So each report is an .aspx file that is given a data-access object it then queries directly and generates reports itself. Obviously this does not work well for reports that take a long time to build (but that's usually a symptom of bad DB design or a lack of indexes), but if your requirements are simple (i.e. a bunch of SQL SELECT queries rendered to <table> and some charts to go along with) then this approach works great.
You can use SAP CRYSTAL REPORTS for your reports.
First, pick the reporting engine you want to use... Crystal Reports, DevExpress Reporting, Telerik Reporting, ComponentOne ActiveReports are the main players outside of Microsoft's SSRS. Base your decision on which tool you want to "marry", because creating reports can be a pain or it can be easy, depending on which tool you pick for the job.
Once you have that, pick the server software that works for your situation. There are several choices for Crystal servers (including SAP Crystal Server, VersaReports ReportServer, etc.), only a few choices for the other engines.

Categories