I'm new to the development area and I'm doing some tests with telerik.
my problem is as follows
at the moment my application already generates the CSV file and I already have the report layout ready, I would like some path in C# to load this
my pdf is generated without the data source , how do I solve this ?
{
var csvDataSource = new CsvDataSource();
csvDataSource.Source = new Uri(@"C:\Users\victord.lima\Desktop\Exemplos\31teste.csv");
csvDataSource.FieldSeparators = new[] { ',' };
csvDataSource.RecordSeparators = new[] { '\r', '\n' };
csvDataSource.HasHeaders = true;
csvDataSource.EscapeFormat = CsvEscapeFormat.Quotes;
csvDataSource.Quote = '"';
Telerik.Reporting.Report report = new Telerik.Reporting.Report();
report.DataSource = csvDataSource;
System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
UriReportSource reportSource = new UriReportSource();
reportSource.Uri = @"C:\Users\victord.lima\Desktop\Exemplos\TermoDeliberacaoDeCargaDeRecebimento.trdx";
Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("PDF", reportSource, deviceInfo);
string fileName = result.DocumentName + "b." + result.Extension;
string path = System.IO.Path.GetTempPath();
string filePath = System.IO.Path.Combine(path, fileName);
using (System.IO.FileStream fs = new System.IO.FileStream(filePath, System.IO.FileMode.Create))
{
fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
}