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.
Unfortunately, activation email could not send to your email. Please try again.

Reporting

Thread ID:

Created:

Updated:

Platform:

Replies:

118131 Feb 3,2015 01:13 PM Feb 4,2015 08:34 AM WPF 1
loading
Tags: ReportDesigner
Richard F
Asked On February 3, 2015 01:13 PM

I need to create a Windows Forms application that has the ability to view existing RDLC reports, and also to create new RDLC reports and view the results.

I know there are WPF controls for viewing and designing reports, but how come there are no Windows Forms equivalents?

How do I do reporting (viewing AND designing) in a Windows Forms application?

P.S. I know nothing about developing WPF applications!

Nithya B [Syncfusion]
Replied On February 4, 2015 08:34 AM

Hi Richard,

Thanks for using Syncfusion products.

Query

Response

I need to create a Windows Forms application that has the ability to view existing RDLC reports, and also to create new RDLC reports and view the results.

I know there are WPF controls for viewing and designing reports, but how come there are no Windows Forms equivalents?

Windows Forms Integration enable interoperation between the Windows Forms and WPF technologies. You can use ElementHost class to use a WPF element in a Windows Forms-based application. Please refer the following link for more details on this.

https://msdn.microsoft.com/en-us/library/System.Windows.Forms.Integration(v=vs.90).aspx

Viewing reports in a Windows Forms

You can use WPF ReportViewer control in WindowsForms using ElementHost, through which you can view existing reports in ReportViewer as shown in below code.

ElementHost host = new ElementHost();

host.Dock = DockStyle.Fill;

reportViewerControl.ProcessingMode = ProcessingMode.Local;

reportViewerControl.ReportPath = @"../../Company Sales.rdlc";

reportViewerControl.DataSources.Add(new ReportDataSource("Sales", new AdventureWorks().GetDataTable()));

reportViewerControl.RefreshReport();

host.Child = reportViewerControl;

We have prepared a sample based on this and it can be downloaded from the following location.

http://www.syncfusion.com/downloads/support/directtrac/general/ReportViewer1244864791.zip

Designing reports in a Windows Forms

We are facing some issues in using ReportDesigner in ElementHost, in order for you to get a solution for this behavior, please contact us at Syncfusion Support or you may also open a support ticket by login in to direct trac account and mention this forum link for reference.

Please let us know if you have any questions.

Regards,

Nithya B



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;