Recommendation for report in asp.net - c#

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.

Related

Data visualization from database

Im a newbie for such programming like reports/visualizations si I´m here just to ask for some advices, resources, tutorials..
The main goal of my new focus is to create custom charts/visualizations within really small time. Right now I have made some kinds of reports for Machines Overview, Machines Availability or OEE. These are made in MS SSRS (SQL Server Reporting Services). This kind of reports creating is pretty good, also very limited and not modern. The procedures in SQL server are already written and at least everything I have to do is transform these data to a newer modern design (kinda innovative internal business project)
I started studying ASP.NET MVC 2 months ago to create these charts as a web app. Searched hours for tutorials and videos on youtube, but there are no proper tutorial to visualize data directly from database. Found chart templates for MVC e.g.:
link: https://canvasjs.com/asp-net-mvc-charts/stacked-column-chart/
Here I can find the main source code for the whole chart but the values that´s being showed are strongly typed. I´m trying to figure out how to show exact values from database. I would like to know how to assign exact values for axis X and Y + values calculated from stored procedure.
In visual studio followed the instructions from various tutorials how to create WebForms, MVC website etc. Everywhere they were showing local/strongly typed values.
I need 1 solution for reports where everything is prepared in SQL, there just needs to be somehow connected from database to chart.
Like in the mentioned link there is a controller window where should be maybe some {get; set;} statement from database with same column name as in SQL DB.
We are using
SQL Server 2015
SQL Management studio 2015
SQL Server Reporting Services (SSRS)
MS ReportBuilder
the code to show can be expected in the mentioned link from canvas.js link for the whole MVC chart.
Reports:
I´m looking for a specific solution where I found specific charts (e.g.: canvas.js) what I have to edit and how, to use our data in specific charts. I´m interested in so bad because later in future my department will focus on creating custom specific charts for customer requirements.
Visualization:
Same goal as in Reports. Actually the visualization in production is just mentioned as "visualization" at least it´s just a report which has inside an html meta tag for 30sec autorefresh. I would like to know some other method where the data change could be asynchronous (I have heard something about React for this?)
If what you want is visualize data directly from database, you should look for a BI or business intelligence tool such as Power BI, SAS, SAP, etc.
If you plan to make them your own through a web app and you want to use ASP.NET MVC then you'd really have to study some Javascript, HTML, and MVC itself. What needs to happen is;
From your ASP.NET MVC web app, inside your Controller you need to get the data from the database. Search ADO.NET if you think Entity Framework might take some time.
Now that you have data in your Controller, it's time to pass them to the View. Search ViewBag or ViewData if don't want to use Strongly typed models.
Now that the data is inside the View, it's time to use Javascript or Jquery to loop through that data and pass them to the Charts javascript library you mentioned.
you can try dotnet Report builder https://www.dotnetreport.com and see if it works for your requirements. It’s very fast, installs with just a nuget package and some configuration. Sounds like exactly what you need. Full disclosure, I’m affiliated with the company.

Embedding a report in Entity Framework or an alternative to reporting services?

I have built a webapp for the company I work for, and I need the ability to quickly generate parameterized reports that can be exported to CSV, Excel, PDF, etc. Obviously, my first go-to was to use reporting services provided by SQL Server, but it seems to be coming up short for cross browser support, and embedding in razor views.
Is there any information out there on how to make this work smoothly, or possibly alternate frameworks I can look into to make generating these reports more simple?
ssrs has web services which do not need any browser (if it's just about generating a file output)
or there is a asp.net web control, but it will probably not be much better for cross-browser support
https://msdn.microsoft.com/en-us/library/ms251671.aspx

Crystal Reports in MVC

Ok, so I'm building a kind of reporting central for the company I work at and the easy part was building a web based file browser, now I'm moving on to the report aspect of it and to start it off, I'm integrating Crystal Reports.
I've already gotten the files from the SAP website for them, but I'm encountering a couple problems,
First off, all the examples I've found make it so that you have to define the data source/database, and include log in information for it in the code. This is a problem because we have a LOT of crystal reports, with a lot of different database references, so I can't just use one for all of them. In fact, there are reports that we use that reference multiple database at the same time.
Secondly, all the examples I've found make it seem like you have to have a specific page created for each report. My goal is to be able to have the report link as a variable and have one page for all of the reports we have.
I looked at everything I could find yesterday and I couldn't find what I needed. I'm also wondering what on earth the ReportClass.Load function even does. It was in every example I could find and I didn't notice any explicit difference in the ReportClass I had when I used it.
While searching, I found an answer that suggested building a web forms application that would build the Reports, and then use an I-Frame to grab it, but that's something I want to avoid.
So in review:
1) I need to build Crystal Reports without having to reference the Database
2) I need it to be flexible to a variable Report by supplying just the path to the .rpt file
3) I would like it to be in a single application, in MVC, and avoiding IFrames
Thank you so much for your help!!
EDIT: I found a solution that works for me. Instead of using a RAZOR view, I used an ASPX view, which has the Crystal Reports Viewer Tool in the toolbox. In order to make it variable I used the ViewBag.
Controller Code:
[HttpGet]
public ActionResult Viewer(string Path)
{
var sessionID = Session.SessionID;
ViewBag.Path = newPath;
return View();
}
ASPX View Code:
<% Report.Report.FileName = ViewBag.Path; %>
<CR:CrystalReportViewer ID="Viewer" runat="server" AutoDataBind="True" GroupTreeImagesFolderUrl="" Height="100%" ReportSourceID="Report" ToolPanelWidth="200px" Width="100%" />
<CR:CrystalReportSource ID="Report" runat="server">
<Report></Report>
</CR:CrystalReportSource>
A "similar" (not exact) question was asked here. Hopefully that can get you down the right path.
1) I need to build Crystal Reports without having to reference the Database
Have you considered building a data warehouse for your reporting and analysis needs? A data warehouse has many benefits over a traditional reporting structure especially when drawing data from multiple sources.
In regards to point 2 & 3 have you considered that crystal reports may simply not be the most ideal reporting solution?
Crystal reports is a powerful tool but honestly I'm not a big fan of it when it comes providing reporting intelligence over the internet or an intranet.
Having you considered switching tools? For example http://www.tableausoftware.com/ provides some excellent data visualization tools and IMO is a much better tool for the job you are describing.
Note, that this is simply one tool (as there are many out there), but one that I have had some experience with and it exceeded our expectations especially when sitting on top of a data warehouse.

How to write a simple designer for printed reports

I'm currently having a couple of reports which I print from my Forms applications.
However building printed reports only with the built-in .NET printing methods is very tedious. Even just printing a simple table on a couple of pages with a little bit of formatting is a task for a couple of hours (if it should look nice).
What I need is a WYSIWYG-Designer for the layouts, so I'd like to write one.
It shouldn't be for End-Users, but for me as a developer, it's just about to create the layout what the report will look like with various arrangements/fonts/images/formats and so on and not have to do that by trial & error in code (and restart the app a zillion times).
So my specific questions:
What would I use as a canvas for editing and display of the report? An image-control/bitmap which I draw upon like on the printed document? Is there a better way?
Is drawing on a form comparable to drawing on a printed page? What about differences in resolution printer vs. screen?
How to get real WYSIWYG? Should I get the printer settings and create my canvas with the same resolution? Is there something else to consider?
I know that there are report designers around but I think it's sometimes good to understand the basic working principles of what you use and implementing them is for me the best way to do that.
I'm aware that this is not a specific question A to which the answer is always B, but if it were that way I would find an answer in Google pretty quickly.
Thanks in advance!
I can't say much about designing a WYSIWYG editor, but I have written a few custom in-house reporting engines for use by our development team.
There's two main ways I've created reports. The first is using PDFsharp (MIT-licensed) to manually layout pages which isn't for the faint-of-heart.
The second is using Winnovative's HTML to PDF library (not free, but royalty-free) which uses the current installed version of IE to do the layout and spit out a PDF. It looks like they've recently released a new version called EVO PDF which I have never used before.*
For the HTML to PDF solution, it supports JavaScript so you can add in charts from JavaScript libraries like flot or jqplot.
*I'm not affiliated with Winnovative.
You might want to save time and use Visual Studio HTML designer as your WYSIWYG editor.
What I'm currently doing is using ASP.NET MVC 3 as a simple reporting engine. You can use the MVC pattern to really separate your reporting data source (Model) and the rendering (View) while using Visual Studio as your report designer.
From your application you can easily call your actions with the report optional parameters. For example:
http://localhost/Report/Customer/Orders/1
You simply get the returning string from a WebClient's DownloadString method and you have your report generated.
There is some down side using HTML, mainly the difficulties to know when a page would break, but by using code in your View you can calculate the amount of repeating items and add a CSS break-page and re-starting your table's header on the next page.
You can achieve anything from graphics, to table, you can even generate link to other reports.
HTH.
Printing Reports in Windows Forms
http://msdn.microsoft.com/en-us/library/ms996472.aspx

Reporting Services 2005 Report with Disclaimers page after each section

Details:
I am using Reporting Services 2005 in a C# Application with Visual Studio 2008 to generate reports based on a SQL Server 2005 database. The application views the report locally using the .net report viewer and no report server is used. There is a page break in the report after each person. I am currently using just one report table for the .rdlc file to generate the report.
Question:
My client wants to put a disclaimers page after the grouping has ended for each person listed on the report. The client wants to be able to adjust the disclaimer page on the fly through the user interface, before running the report. Please offer suggestions on how I can accomplish this.
Any help is appreciated.
Thanks,
Jeremy
An alternative solution would be to create another report for the sole purpose of rendering the Disclaimer content. The Disclaimer report can then be embedded (via a subreport: see http://msdn.microsoft.com/en-us/library/ms160348.aspx) into your existing reports thereby allowing you to dynamically modify the content of the Disclaimer separately.
You could store the actual Disclaimer content within a SQL Server Database table and update it via any number of the typical simple standard .NET controls that are at your disposal.
This has the advantage of no character restrictions as per the prior recommendation.
Do you mean they want to adjust it on the fly PRIOR to executing the report or after?
If before, could you not use a parameter, with the disclaimer template as the default value and submit it to the report when they are done? You could then put the parameter in the group footer.
If after then...good luck :) The report is rendered into whatever format chosen. If you are retrieving the report in html and have the rendered file perhaps custom parsing could be done but seems a bit naff. Been a while with SRS, hopefully the param could work for you.

Categories