Repository navigation
Designer Control
Peter Gill edited this page Jun 8, 2026
·
9 revisions
The Majorsilence Reporting designer control can be used from a Windows Forms or WPF application (Windows-only).
dotnet add package Majorsilence.Reporting.ReportDesignerIf you are adding to a WPF application also add references to:
- System.Windows.Forms
- WindowsFormsIntegration
Call RdlEngineConfig.RdlEngineConfigInit() once at application startup before using any reporting controls. See Database Providers Howto.
See https://github.com/majorsilence/Reporting/tree/master/Examples/SampleDesignerControl for a fully working WinForms and WPF example.
using Majorsilence.Reporting.Rdl;
[STAThread]
static void Main()
{
// One time per app instance
RdlEngineConfig.RdlEngineConfigInit();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Form frm = new Form();
var ctl = new Majorsilence.Reporting.RdlDesign.RdlUserControl();
ctl.OpenFile(@"The path to the rdl file.rdl");
ctl.Dock = DockStyle.Fill;
frm.Controls.Add(ctl);
Application.Run(frm);
}<Window x:Class="SampleDesignerControlWPF.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
xmlns:myctrl="clr-namespace:Majorsilence.Reporting;assembly=RdlDesigner"
Title="MainWindow" Loaded="Window_Loaded_1" Height="auto" Width="auto">
<DockPanel >
<WindowsFormsHost Margin="0" Name="windowsFormsHost1" DockPanel.Dock="Top">
<myctrl:RdlUserControl x:Name="reportDesigner" />
</WindowsFormsHost>
</DockPanel>
</Window>private void Window_Loaded_1(object sender, RoutedEventArgs e)
{
System.Windows.Forms.Application.EnableVisualStyles();
reportDesigner.OpenFile(@"The path to the rdl file.rdl");
}