I will send the data table to the local report file and print it out in the form of a table.
I tried to send only Parameters using UriReportSource, but I don't know how to send dataTable.
And I don't know how to show it in the form of a table in the trdp file.
You must send data to a report file in a specific folder and print it out, not through the server.
I tried to send only Parameters using UriReportSource, but I don't know how to send dataTable.
And I don't know how to show it in the form of a table in the trdp file.
You must send data to a report file in a specific folder and print it out, not through the server.
Hi Konyang,
When the report is a TRDP file, you may create a report instance with our ReportPackager class. Here is a sample code demonstrating the approach:
var report = null; var reportPackager = new ReportPackager(); using (var sourceStream = System.IO.File.OpenRead("Report1.trdp")) { report = (Report)reportPackager.UnpackageDocument(sourceStream); } report.DataSource = GetMyDataTable(); // Use the InstanceReportSource to pass the report to the viewer for displaying var reportSource = new Telerik.Reporting.InstanceReportSource(); reportSource.ReportDocument = report; // Assigning the report to the report viewer. reportViewer1.ReportSource = reportSource; // Calling the RefreshReport method in case this is a WinForms or WPF application. reportViewer1.RefreshReport();
I hope this will help. If you have further questions we will be glad to assist.