|
Query |
Response |
|
a Report designer application where you have a XML data as a stream. this XML data is only for Report design purpose due to have all fields in the Report designer. after designing a Report the Report (rdl as a stream) will be stored in the database, without the XML data!
|
You can design a report with dummy XML data and save the report into the database with dataset structure for binding data at runtime. Please find the sample report based on your requirement.
|
|
) a .net 4.7.1 Service reading on request the rdl data from the database (rdl as a stream), selecting the XML data (XML as a stream, equivilant to the XML schema at design time), bind the XML to the Report datasource on runtime and render a PDF as a stream which will be after send via email. |
Your requirement can be achieved by two methods.
1. You can bind the XML data to the report in code behind by converting the XML data into datatable and load this datatable as a datasource for the report viewer to achieve your requirement. We have prepared a sample to save the RDL report in database as stream and retrieve the RDL file from the database to load the report in viewer. Also, we have converted a “Employee.xml” as datatable to provide dataset values to the report viewer. Please find the sample from the below location.
Note: We have used local database for saving the RDL report, so we request you change the database part based on your need.
2. Alternatively you can edit the RDL report in code behind and update the XML dataset query in report definition to bind the data. Please find the below KB link for editing report in code behind.
|