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.

ReportViewer Databinding

Thread ID:

Created:

Updated:

Platform:

Replies:

130819 Jun 5,2017 09:32 AM Jun 27,2017 09:40 AM WPF 7
loading
Tags: ReportViewer
Forstmeier Peter
Asked On June 5, 2017 09:32 AM

Hi,

i'm working on Solution with some 'Modules' (Prism) for example Projects, Employees and so on.

My idea is now to store Reports in the Moduls (Project-Reports in ProjectsModul)

Now im looking for a way to have only one global available UserControl with the ReportViewer.

Is there any idea how to pass the selected Report and Parameters etc  to the ViewModel of this UserControl and run a report.

Thanks in advance

Peter


Vinoth Srinivasan [Syncfusion]
Replied On June 7, 2017 08:09 AM

Hi Forstmeier, 
 
Thanks for your interest in Syncfusion components. 
 
We have prepared a sample based on your requirement by adding the report to the user control and refreshed the report viewer based on the selection of report from the user control. The sample can be downloaded from the following location. 
 
 
Regards, 
Vinoth S. 


Forstmeier Peter
Replied On June 7, 2017 02:08 PM

Hi,
thanks for the example.
I can just view the Code because build and running is not possible because of plenty error's.

peter

Vinoth Srinivasan [Syncfusion]
Replied On June 8, 2017 05:49 AM

Hi Forstmeier, 
 
We were able to run the sample at our end without any errors and we suspect that the errors are occurring due to the assemblies of our WPF control are not properly referred. So, we request you to refer the missing assemblies in the project to run the sample. Please refer the below online documentation for dependent assemblies required for our report viewer control. 
 
 
If you still face any issue then please share the screenshot of the issues that you are facing. It will be helpful for us to validate the issues at our end. 
 
Regards, 
Vinoth S. 


Forstmeier Peter
Replied On June 8, 2017 01:40 PM

Hi,
my fault. Sorry about that
The Report runs perfectly.

Thanks a lot
peter

Vinoth Srinivasan [Syncfusion]
Replied On June 9, 2017 05:15 AM

Hi Forstmeier, 

Thanks for your update. Please let us know if you require any further assistance on this. 

Regards, 
Vinoth S. 


Forstmeier Peter
Replied On June 26, 2017 02:11 PM

Hi,

me agian.

I bring your example to work....

Now there is the next problem, i have my Data with EntityFramework and i'm looking for a way to set the DataSource of the report the same way as the ReportNae in your example. So, in my Module i can load the entity, fill the Dataset, select a Report and raise a event wich is catched in my PrintModul.

Thanks

Peter



Vinoth Srinivasan [Syncfusion]
Replied On June 27, 2017 09:40 AM

Hi Forstmeier, 
 
As per standards is you want to set the ER datavalues then use RDLC reports in your application. In previously shared sample we have used ReportModel class with ReportName property, add a new property “DataSource” of type “ReportDataSourceCollection” and add the required datasource details for report. While selecting the report, based on the selection assign the report path and datasource values from ReportModel class to report viewer as shown in below code snippet. 
 
Viewer.DataSource.Add(“DataSourceCollection”) 
 
Regards, 
Vinoth S. 


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.

;