Hi, I am developing a mvc3 razor app where i am using telerik report. Look at the below program , when i run my app in local pc it works fine. but when i upload the site in the server it shows following error:
Telerik.Reporting.Processing.RendererNotAvailableException: pdf rendering format is not available.
I added Telerik.Reporting.dll into my app including bin folder.
Telerik.Reporting.Processing.RendererNotAvailableException: pdf rendering format is not available.
I added Telerik.Reporting.dll into my app including bin folder.
public ActionResult Rpt()
{
DataSet1 ds = new DataSet1();
ds.DataTable1.Rows.Add("Imran", "Milibagh");
ds.DataTable1.Rows.Add("Sahk", "Mouchak");
ds.DataTable1.Rows.Add("Mohammad", "Gulshan");
ds.DataTable1.Rows.Add("Rana", "Bogura");
Report1 rp = new Report1();
rp.DataSource = ds;
ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
RenderingResult renderingResult = reportProcessor.RenderReport("pdf", rp, null);
MemoryStream ms = new MemoryStream();
ms.Write(renderingResult.DocumentBytes, 0, renderingResult.DocumentBytes.Length);
ms.Flush();
FileContentResult result = new FileContentResult(ms.GetBuffer(), renderingResult.MimeType);
result.FileDownloadName = "a.pdf";
return View();
}