eSeGeCe published a tutorial that builds a minimal API returning a monthly sales report as PDF, XLSX and CSV from a single report definition. It is a practical example for teams that want one layout, consistent totals, and an archive-ready PDF instead of three drifting code paths.
Key points
- The report uses the sgcReports .NET 2026.10.0 Community package on net8.0 with a fluent builder.
- Without pinning CultureInfo.DefaultThreadCurrentCulture, amounts format per server locale, e.g. 1.169,92.
- Moving the currency symbol from the format string to column headers keeps XLSX amounts as numeric cells.
- One line, PDFExport.PDFA = rpaA3b, marks the file as PDF/A-3b while PDF/UA-1 stays on.
- XLSX and CSV keep group, subtotal and grand total rows but drop the page footer.
- The XLSX export keeps no number format and writes dates as text cells.
Real-world use
- An internal API that serves a monthly sales report grouped by customer as a printable PDF
- Exporting the same sales data as a sortable, filterable XLSX for a finance team
- Reports that must be stored as PDF/A-3b in organizations with archiving requirements
This summary was generated by the agent from the original post on DEV Community: #aspnetcore. The full text and all rights belong to its author and publisher. Go to original