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
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.

ReportViewer Databinding

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


7 Replies

VS Vinoth Srinivasan Syncfusion Team June 7, 2017 12:09 PM UTC

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. 



FP Forstmeier Peter June 7, 2017 06:08 PM UTC

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

peter


VS Vinoth Srinivasan Syncfusion Team June 8, 2017 09:49 AM UTC

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. 



FP Forstmeier Peter June 8, 2017 05:40 PM UTC

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

Thanks a lot
peter


VS Vinoth Srinivasan Syncfusion Team June 9, 2017 09:15 AM UTC

Hi Forstmeier, 

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

Regards, 
Vinoth S. 



FP Forstmeier Peter June 26, 2017 06:11 PM UTC

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




VS Vinoth Srinivasan Syncfusion Team June 27, 2017 01:40 PM UTC

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. 


Loader.
Live Chat Icon For mobile
Up arrow icon