Best approach for using Fast Reports
We are looking to use FastReports as a new service for generating our reports. We have a number of old fixed format pdf reports that we need to rewrite.
Our Requirements
We would like a reports service that we can call from an ASP MVC 5 application
We would like to be able to specify the report id and supply the data to produce the report (possibly JSON?)
We would like the service to return a PDF file
Questions
There are a number of different offerings from FR. We would like to know other peoples experiences and the best product to choose.
Does anyone have experience of implementing something similar?
Are the reports easy to design with FR?
Any gotchas to avoid?
Thanks,
This discussion has been closed.
Comments
Hello!
You can use FastReport.Core + PDFExport (or FastReport.Core.Skia for Docker/Linux, which has no dependencies on Windows/GDI+).
Unlike FastReport.OpenSource.Export.PdfSimple (which saves pages as images), PDFExport creates a compact PDF with text highlighting, bookmarks and a digital signature.
Create a separate instance using `var report = new Report();` for each request (under high load, the .frx template can be cached as bytes/XML, but do not reuse a single `Report` object).
You can use a connection via `JsonDataSourceConnection` (from the `FastReport.Data.Json` package) or deserialise JSON into a C# model / `DataSet` and pass it via `report.RegisterData(...)`.
If you need an example of a ready-made REST endpoint, please let me know which target platform (.NET Framework 4.8 vs .NET 8) is planned for the report generation service.