Reports in .NET Winforms

I am writing a Winforms application and I wrote these horrible HTML reports where I have templates installed and use String.Replace to get my variables in the templates and then output the results to the WebBrowser control. I really don't like it.

I would like to be able to use ASP.NET for my reports, but my clients do not want to run IIS on all the machines on which it is installed, so this is really not an option.

+4
source share
7 answers

As mentioned earlier, use the client-side report viewer. You can create reports in the same way as for sql report services, except that you do not need a sql server (or asp.net). In addition, you have full control over them (how you imagine, how you collect data, what layer they are generated, etc.). You can also export both PDF and Excel.

Here's a great book in which I recommend everyone to see if they are interested in client-side messaging. This provides great information and many different scenarios and ways to use client-side reports.

http://www.apress.com/book/view/9781590598542

+3
source

Have you tried ReportViewer control ? Your customers will be pleased with the new news. It is based on templates and can include data from a database or from code data, you can use parameters, images, and the result can be exported to Excel or to PDF.

Plus, the control has some basic functions, such as paging, scaling, printing, searching ...

Why do you need ASP.NET? I don’t see what difference it can make. You may be able to make your HTML more easily, but it is still not a “real” report.

+4
source

While I haven't used it, I hear a lot of podcast ads for Telerik posts . What you should pay attention to. It looks pretty nice.

+1
source

You can use the version of Crystal Reports included in Visual Studio and save the output in a .PDF file that would not be too inconvenient to read from the browser. (This is what I did under my last contract)

+1
source

Why not use xsl to generate html reports? Much nicer than replacing a string.

+1
source

You can take a look at Cassini , a free component of the ASP.NET web server that can be embedded directly into your WinForms application. The UltiDev version (bundled) is based on code released by Microsoft in .NET 1.0, which was also used for the Visual Studio 2005+ development web server.

0
source

For an advanced reporting solution that goes beyond the scope of a dataset, just a reportviewer in VS, you should consider Dynamic Information Reports

It offers everything that is in SSRS, and adds basic reports, themes, a calendar data area, data visualization (Databar, Sparkline, Iconset, ColorScale, ...), a complete object model for maximum programming flexibility, an end-user report without royalty designer , barcode report item, export Excel templates and data merge and much more. You can download a trial version of Data Dynamics (now GrapeCity) and try it with several reports, you will not be disappointed.

0
source

Source: https://habr.com/ru/post/1277355/


All Articles