-
Notifications
You must be signed in to change notification settings - Fork 204
Getting Started
Majorsilence Reporting covers several different use cases. This page helps you find the right starting point.
Choose a viewer based on your UI framework:
| Framework | Viewer | Platform |
|---|---|---|
| WinForms | WinForms Viewer | Windows |
| WPF | WPF Viewer | Windows |
| Avalonia | Avalonia Viewer | Windows, Linux, macOS |
| GTK# | GTK# Viewer | Linux, macOS |
Recommended for new projects: the Avalonia viewer works on all platforms and is the most actively developed.
Minimum working example (WinForms):
// One time per app instance
RdlEngineConfig.RdlEngineConfigInit();
// In your Form Load event
await _rdlView.SetSourceFile(new Uri(@"C:\reports\report.rdl"));
await _rdlView.Rebuild();Use the engine directly — no GUI required. Works on Linux, macOS, and Windows.
Minimum working example:
RdlEngineConfig.RdlEngineConfigInit();
var rdlp = new RDLParser(await File.ReadAllTextAsync("report.rdl"))
{
Folder = @"/reports"
};
using var report = await rdlp.Parse();
await report.RunGetData(null);
var ofs = new OneFileStreamGen("output.pdf", true);
await report.RunRender(ofs, OutputPresentationType.PDF);Next steps:
- Export Without GUI — full file export reference
- Streaming PDF — ASP.NET Core — HTTP response streaming
The engine can take data from any C# collection. You don't need a database connection at all.
Minimum working example:
public record SaleRow(string Region, string Product, decimal Amount);
RdlEngineConfig.RdlEngineConfigInit();
var rdlp = new RDLParser(await File.ReadAllTextAsync("report.rdl"));
using var report = await rdlp.Parse();
var data = new List<SaleRow>
{
new("North", "Widget A", 1500m),
new("South", "Widget B", 800m),
};
await report.DataSets["SalesData"].SetData(data);
await report.RunGetData(null);
using var ms = new MemoryStreamGen();
await report.RunRender(ms, OutputPresentationType.PDF);Next steps:
- Passing Data to a Report from .NET — all four data source types (IEnumerable, DataTable, IDataReader, XmlDocument)
Point the report at your database with a connection string. Supported databases include SQL Server, PostgreSQL, MySQL, SQLite, ODBC, and more.
RdlEngineConfig.RdlEngineConfigInit();
var rdlp = new RDLParser(await File.ReadAllTextAsync("report.rdl"))
{
Folder = @"C:\reports",
OverwriteConnectionString = "Server=myserver;Database=mydb;..."
};
using var report = await rdlp.Parse();
await report.RunGetData(null);Next steps:
- Database Providers — provider list and RdlEngineConfigInit
- SQL Server, PostgreSQL, MySQL
Use report parameters to pass values at run time — to filter SQL queries, control layout, or display user selections.
var parameters = new Dictionary<string, string>
{
{ "StartDate", "2024-01-01" },
{ "EndDate", "2024-12-31" }
};
await report.RunGetData(parameters);Next steps:
- Report Parameters — full guide for designers, code, and all viewer types
Use RdlDesigner — a Windows application included with the project.
- Create a New Report — step-by-step wizard
- Designer Basics — interface overview
- Running the Designer on Linux — via Wine
See the Migration to v5 guide. Key changes:
- Namespace:
fyiReporting.*→Majorsilence.Reporting.* - All API methods are now
async/await - Target framework: .NET Framework 4.x → .NET 8.0+
- Rendering backend: GDI+ → SkiaSharp (enables Linux/macOS)
| Scenario | Windows | Linux / macOS |
|---|---|---|
| Server-side export |
Majorsilence.Reporting.RdlEngine + RdlCri
|
...RdlEngine.SkiaSharp + ...RdlCri.SkiaSharp
|
| WinForms viewer | Majorsilence.Reporting.RdlViewer |
— (Windows only) |
| WPF viewer | Majorsilence.Reporting.LibRdlWpfViewer |
— (Windows only) |
| Avalonia viewer | Majorsilence.Reporting.UI.RdlAvalonia |
Same |
| GTK# viewer | — | Majorsilence.Reporting.RdlGtk3 |
| Code-first report creation |
Majorsilence.Reporting.RdlCreator (or .SkiaSharp) |
Same |
See Downloads for the full package list.