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.

Adding RDL data source programmatically

Hi!

I am using a RDL template and I would like to programmatically add my data source specifying SQL CE database file location (pathToApplication\database.sdf). 

I have seen these two lines in the documentation under Generating RDLC Reports:

ReportDataSourceCollection dataSources = new ReportDataSourceCollection();
dataSources.Add(new ReportDataSource { Name = "ProductCatalog", Value = ProductCatalogSource.GetData() });
but it does not do what I want since the collection or ReportDataSource itself does not contain the setPath() method or something similarly.

I would be glad if you could help me out.

In advance thank you for your help.

Regards, 
Karmen Gostiša

4 Replies

VS Vinoth Srinivasan Syncfusion Team November 23, 2016 11:23 AM UTC

Hi Karmen, 
 
Thanks for contacting Syncfusion support. 
 
The RDL reports has connection details within the report datasource to get necessary data for rendering, so you can’t set the data values in code behind using the shared code snippet. You can programmatically edit/modify the RDL reports to change the “connection string” of existing datasource or you can add new datasource. Refer to the following Knowledge base to edit the report definition of a report in code behind. 
 
 
Regards, 
Vinoth S. 



YJ Yusuf juanda August 24, 2022 08:15 AM UTC



when my report is displayed and i get a message like this







AM Arumugasami Murugesan Syncfusion Team August 25, 2022 11:41 AM UTC

Hi Karmen,


Thanks for the update,


Please find the details from the below table,


Query

Response

I am using a RDL template and I would like to programmatically add my data source specifying SQL CE database file location (pathToApplication\database.sdf). 

 

You can generate the RDL and RDLC reports programmatically in the report viewer. Please refer to the below documentation

https://help.boldreports.com/embedded-reporting/aspnet-core-reporting/report-viewer/how-to/generate-rdl-rdlc-report-programmatically/

 

Please refer to the below documentation to change the data source dynamically

 

https://help.boldreports.com/embedded-reporting/how-to/change-the-report-datasource-dynamically/

 

I have seen these two lines in the documentation under Generating RDLC Reports:

 

ReportDataSourceCollection dataSources = new ReportDataSourceCollection();

dataSources.Add(new ReportDataSource { Name = "ProductCatalog", Value = ProductCatalogSource.GetData() });

 Copy

but it does not do what I want since the collection or ReportDataSource itself does not contain the setPath() method or something similarly.

 

For rendering the RDLC report, Please refer to the below documentation

https://help.boldreports.com/embedded-reporting/wpf-reporting/report-viewer/rdlc-report/

 

If you are still facing any issue, could you please share the additional details of this issue with issue snap with us? It will be helpful for us to validate and provide the solution at the earliest.

 



Regards,

Arumugasami M.



AM Arumugasami Murugesan Syncfusion Team August 25, 2022 01:51 PM UTC

Hi Karmen,


Please ignore the last update,


Could you please share the additional details of this issue with us? And also, is it possible to share your reproducible simple sample with us? It will be helpful for us to validate and provide the solution at the earliest.


Regards,

Arumugasami M.


Loader.
Up arrow icon