We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon
Starting in 2019, the Reporting control is no longer included in Essential Studio. If you're experiencing issues with the Syncfusion Reporting Platform, Report Viewer, Report Designer, or Report Writer, we recommend migrating to Bold Reports, our dedicated reporting platform.

Bold Reports offers a comprehensive suite of tools and features for all your reporting needs, and we will help you make a smooth transition from the discontinued control. Our support team at https://support.boldreports.com/ is here to assist you with any questions or difficulties you may encounter during the migration process.

We thank you for choosing Syncfusion and appreciate your understanding.

Migrating from MS Report to WPF Reportviewer

Hello,
I'm using MS Reports for Forms in a WPF Desktopapplication. No I'm testing your WPF Reportviewer. I can't get it to work. I take a .rdlc File Version 2008 only with one Tablix table. At MS reports I have a DataSet.xsd File and connect the DataSource in the Code behind. With your report viewer I can't get the data into the report. I have already tried with a List element but without success. How can I add the data to the report at runtime?
regards
Kurt

1 Reply

VS Vinoth Srinivasan Syncfusion Team April 23, 2019 06:32 AM UTC

Hi Kurt, 
 
Thanks for your interest in our Syncfusion Components. 
 
We can able to pass the datasource for RDLC report in code behind as shown in below code example. 
 
            public MainWindow() 
            { 
                InitializeComponent(); 
                this.Loaded += new RoutedEventHandler(MainWindow_Loaded); 
            } 
            void MainWindow_Loaded(object sender, RoutedEventArgs e) 
            { 
                this.viewer.DataSources.Clear(); 
                this.viewer.DataSources.Add(new Syncfusion.Windows.Reports.ReportDataSource() 
                { 
                    Name = "Employee",// provide the dataset name 
                    Value = new AdventureWorksEntities().Addresses.Take(100)//pass the dataset value  
                }); 
                this.viewer.RefreshReport(); 
            } 
 
Please find the below help documentation for your reference to create RDLC report and pass the datasource at run time in code 
 
Regards, 
Vinoth S. 


Loader.
Live Chat Icon For mobile
Up arrow icon