-
Notifications
You must be signed in to change notification settings - Fork 204
Output Formats
Peter Gill edited this page Jun 8, 2026
·
3 revisions
All report rendering methods accept an OutputPresentationType value from the Majorsilence.Reporting.Rdl namespace.
using Majorsilence.Reporting.Rdl;
await report.RunRender(streamGen, OutputPresentationType.PDF);| Value | Extension | Notes |
|---|---|---|
PDF |
Recommended PDF output via SkiaSharp (v5+). | |
Excel2007 |
.xlsx | Excel workbook with full report formatting. |
Excel2007DataOnly |
.xlsx | Excel workbook — data rows only, no headers/footers/formatting. Useful for data export. |
HTML |
.html | HTML fragment. Can be embedded in a web page. |
MHTML |
.mht / .mhtml | MHTML archive — HTML with embedded images, suitable for email. |
CSV |
.csv | Comma-separated values. |
XML |
.xml | Report data as XML. |
RTF |
.rtf | Rich Text Format. |
Word |
.doc | Word-compatible rich text. |
TIF |
.tif | Multi-page TIFF image (colour). |
TIFBW |
.tif | Multi-page TIFF image (black and white). |
These values exist for backward compatibility or internal use. Avoid them in new code.
| Value | Notes |
|---|---|
PDFOldStyle |
Legacy PDF path. Use PDF instead. |
RenderPdf_iTextSharp |
v4-era iTextSharp rendering. Use PDF instead. |
Excel2003 |
Old binary Excel format. Use Excel2007 instead. |
ExcelTableOnly |
Older Excel table-only export. Use Excel2007DataOnly instead. |
ASPHTML |
ASP.NET-specific HTML rendering for the v4 ASP.NET control. |
Internal |
Used by the viewer control to render to screen. Do not use for file export. |
using Majorsilence.Reporting.Rdl;
RdlEngineConfig.RdlEngineConfigInit();
var rdlp = new RDLParser(await System.IO.File.ReadAllTextAsync("report.rdl"));
using var report = await rdlp.Parse();
await report.RunGetData(null);
// PDF
using var pdf = new OneFileStreamGen("report.pdf", true);
await report.RunRender(pdf, OutputPresentationType.PDF);
// Excel
using var xlsx = new OneFileStreamGen("report.xlsx", true);
await report.RunRender(xlsx, OutputPresentationType.Excel2007);
// CSV
using var csv = new OneFileStreamGen("report.csv", true);
await report.RunRender(csv, OutputPresentationType.CSV);Two built-in IStreamGen implementations are available:
| Class | Use for |
|---|---|
OneFileStreamGen(path, overwrite) |
Write directly to a file on disk. |
MemoryStreamGen() |
Buffer in memory — for HTTP streaming, in-process use. Call GetStream() to access the result. See Streaming PDF — ASP.NET Core. |