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.

ReportPath in other Assembly and Localization

Hi,

I'm trying to configure the ReportPath property to load a RDLC report that is in another assembly. I have tried to use the full assembly name (ES.Trainfor.Example.Module.Report.ReportSample.rdlc) in the same way the ReportViewer control from Microsoft does but seems unable to find the report and always get the same error:
"The source of the report has not been specified"

I assign the ReportPath property and the ProcessingMode to Local.

Is there a specific way to set the ReportPath when the report file is in another assembly/project?

And another ReportViewer related question: what is the way to localize the control? There is no information in the documentation about how to do it for this control, or no resource file I could find for it.


Thanks in advance.

1 Reply

VS Vinoth Srinivasan Syncfusion Team July 4, 2016 09:47 AM UTC

  
Hi David, 
 
Thanks for contacting Syncfusion support. 
 
Query 
                                                                                         Response 
I'm trying to configure the ReportPath property to load a RDLC report that is in another assembly. I have tried to use the full assembly name (ES.Trainfor.Example.Module.Report.ReportSample.rdlc) in the same way the ReportViewer control from Microsoft does but seems unable to find the report and always get the same error: 
"The source of the report has not been specified"

I assign the ReportPath property and the ProcessingMode to Local.

Is there a specific way to set the ReportPath when the report file is in another assembly/project?
 
You can retrieve the report as resource stream and load it to ReportViewer using  LoadReport API as shown in the below code snippet. 
 
Assembly assembly = typeof(ReportAssembly.MainWindow).GetTypeInfo().Assembly; 
 
Stream stream = assembly.GetManifestResourceStream("ReportAssembly.ReportTemplate.Company Sales.rdlc"); 
 
Syncfusion.Windows.Reports.Viewer.ReportViewer viewer= mainWindow.FindName("viewer") as Syncfusion.Windows.Reports.Viewer.ReportViewer; 
 
viewer.DataSources.Add(new ReportDataSource("Sales", new ReportAssembly.AdventureWorks().GetDataTable())); 
 
viewer.LoadReport(stream); 
 
We have prepared a sample based on this and it can be downloaded from the below location. 
 
And another ReportViewer related question: what is the way to localize the control? There is no information in the documentation about how to do it for this control, or no resource file I could find for it. 
We have prepared a sample to localize the Report Viewer control using “es-ES” culture. It can be downloaded from the below location. 
 
 
 
Regards, 
Vinoth.S 
 


Loader.
Up arrow icon