I've been getting this error "PDF rendering format is not available" when I try to use the Telerik.Reporting.Processing.ReportProcessor.Render() method to create a byte array in PDF format that I can feed to the Response.BinaryWrite() method. Here is the code I'm using:
Dim objUser As Elements.User = Session("User") |
Dim report As Report = New GuideExport(objUser.QueryResults.XmlDocument) |
Dim Buffer As Byte() = Telerik.Reporting.Processing.ReportProcessor.Render("PDF", _ |
report, Nothing, "", "", Nothing) |
Response.ClearContent() |
Response.AppendHeader("content-length", Buffer.Length.ToString()) |
Response.ContentType = "application/pdf" |
Response.BinaryWrite(Buffer) |
Response.Flush() |
Response.Close() |
The code throws an error on line 3. Strangely enough though, I noticed that when I stop debugging in Visual Studio, then try to access the page, everything works the way that it should...
If anyone knows what is causing this problem, I would love some help. I've just started using Telerik Reporting, and I'm very impressed so far, but this is giving me a headache :)
Thanks,
Jeremy
9 Answers, 1 is accepted
The problem is specific to the Web Site project which runs the assemblies from a cached location which is different from the \Bin folder. To solve the problem you should manually specify the folder where the rendering extension assemblies are located. For example:
Telerik.Reporting.Processing.ReportProcessor.ExtensionDir = HttpContext.Current.Server.MapPath("~/bin");
Another possible solution is to use Web Application project instead of Web Site.
Regards,
Chavdar
the telerik team
Instantly find answers to your questions at the new telerik Support Center
is no longer supported. I have ALL the necessary dlls etc. It is on a server with medium trust.
I am using the latest build of telerik reporting and telerik dll
How do I set the ExtensionDir or get the pdf to render?
Thanks
This forum thread is more than 3 years old and the information in it is outdated. Please always refer to the online documentation and KB articles which are up to date with the latest official version.
About your question - the ExtensionDir is no longer required as all of the rendering extensions are merged in the Telerik.Reporting assembly. I would recommend reviewing the Exporting Report Programmatically help article that elaborates on the topic.
If you experience this problem when deploying your project, make sure you follow the steps from the Deploying Web Applications help article. Since you mentioned medium trust, please note that the PDF rendering extension requires UnmanagedCode permission to operate at all times. If the permission is not present, PDF extension is disabled and removed. In order to check if the required permission is granted our suggestion to add a report viewer and check if the PDF option is available in the export drop down. For more information on the required permissions check out the Medium Trust Support help article.
Steve
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Today we noticed that DOC report export does not work anymore: Telerik.Reporting.Processing.RendererNotAvailableException: DOC rendering format is not available.
Everything else works fine (pdf, docx, xls(x), rtf, tif, pptx).
We are using Q3 2013, ASP .NET 4.0 Website project. As i remember, after updating to Q3 2013 the doc export worked.
thanks for any help
Do you export the report using the ReportProcessor.RenderReport method? If this is the case we are not aware of a DOC rendering extension. For more information on the available rendering extensions see Rendering Extensions help article.
Regards,
Peter
Telerik
Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.
Thank you for your reply! I see DOC is not in the list anymore. So I'm wondering why this was removed...?!?
We've used this for many years now and I don't think that nearly most of our customers have Office 2007+.
Also I thought I really tested this after the update a few times.
To export we use "ReportViewer1.ExportReport(sender.value);"
There is no DOC rendering format. As of Q1 2011 we added open XML rendering formats including DOCX.
You can still use RTF on machines without Office 2007.
Regards,
Stef
Telerik
Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.
So then I added doc just for completeness when I added the XML formats ;)