I new user on Telerik. I want save my pdf report on server. I want when user click save button report save on server a folder.
My function is:
public void SaveReport(string fileName="aaaa")
{
Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
deviceInfo.Add("DocumentAuthor", "Umut Güncan");
deviceInfo.Add("DocumentTitle", "İlkPdfKaydı");
deviceInfo["OutputFormat"] = "JPEG";
Telerik.Reporting.TypeReportSource typeReportSource = new Telerik.Reporting.TypeReportSource();
// reportName is the Assembly Qualified Name of the report
typeReportSource.TypeName = "Telerik.Reporting.Examples.CSharp.Invoice, CSharp.ReportLibrary";
Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("ddfe.PDF", typeReportSource, deviceInfo);
fileName = result.DocumentName + "." + result.Extension;
string path = @"d:\rpr\";
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);
}
}
How can I define assembly name? Reagards...
My function is:
public void SaveReport(string fileName="aaaa")
{
Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
deviceInfo.Add("DocumentAuthor", "Umut Güncan");
deviceInfo.Add("DocumentTitle", "İlkPdfKaydı");
deviceInfo["OutputFormat"] = "JPEG";
Telerik.Reporting.TypeReportSource typeReportSource = new Telerik.Reporting.TypeReportSource();
// reportName is the Assembly Qualified Name of the report
typeReportSource.TypeName = "Telerik.Reporting.Examples.CSharp.Invoice, CSharp.ReportLibrary";
Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("ddfe.PDF", typeReportSource, deviceInfo);
fileName = result.DocumentName + "." + result.Extension;
string path = @"d:\rpr\";
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);
}
}
How can I define assembly name? Reagards...