This is a migrated thread and some comments may be shown as answers.

NotImplementedException during Export to PDF

5 Answers 120 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
raju
Top achievements
Rank 2
raju asked on 21 Apr 2009, 09:33 AM
Hello,

I was trying the Export programmatically from the documentation http://www.telerik.com/help/reporting/programmatic-exporting-report.html.

Then I encountered this error NotImplementedException unhandled by as user code.
at Telerik.Reporting.Processing.ItemFactory.CreateItem(ReportItemBase itemDef)    at Telerik.Reporting.Processing.ReportProcessor.ProcessReport(Report reportDefinition)    at Telerik.Reporting.Processing.ReportProcessor.Render(String format, Report report, Hashtable deviceInfo, CreateStream createStreamCallback, String& documentName)    at Telerik.Reporting.Processing.ReportProcessor.Render(String format, Report report, Hashtable deviceInfo, String& mimeType, String& documentName, String& extension, Encoding& encoding)    at Telerik.Reporting.Processing.ReportProcessor.Render(String format, Report report, Hashtable deviceInfo, String& mimeType, String& extension, Encoding& encoding)    at MyReportViewer.PDF.Page_Load(Object sender, EventArgs e) in D:\Documents and Settings\ajs\My Documents\Visual Studio 2008\Projects\MyReportViewer\MyReportViewer\PDF.aspx.vb:line 12    at System.Web.UI.Control.OnLoad(EventArgs e)    at System.Web.UI.Control.LoadRecursive()    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

My goal was to try to make FontEmbedding flexible during export instead of hardcoding in webconfig. User can have their choice to either embed or not to embed the Arial Unicode. This will give more flexibility for pdf export.

I tried to search for this error but I cant find any reference, may I know whats the cause of the error, or do you have any working sample project that use the fontembedding.

Thanks


5 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 21 Apr 2009, 11:11 AM
Hi raju,

Currently you can control the font embedding outside of the application's config file i.e. it cannot be user specific - it would be applied to all reports in your app.

Sincerely yours,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
raju
Top achievements
Rank 2
answered on 22 Apr 2009, 01:12 AM
Hello Steve,

Thank you for the quick response. When I saw the post http://www.telerik.com/community/forums/reporting/telerik-reporting/pdf-file-size.aspx, I was brought to the impression that the FontEmbedding can be set programmatically.

Dim deviceInfo As Hashtable = new Hashtable()
deviceInfo("FontEmbedding") = "Subset"
Dim reportBytes As Byte() = ReportProcessor.Render("PDF", reportToExport, deviceInfo, mimeType, ext, encoding)

I tried it but I was already having an error stated above. I was trying to find out whats the error all about, but I really can't find any article that describe the cause of error.

Thank you for your help.
0
Steve
Telerik team
answered on 24 Apr 2009, 12:31 PM
Hi raju,

You are correct that such approach is possible. However I did not receive any errors, while trying it on my end. I've attached a sample solution that works as expected on my end. Please give it a spin and let us know how it goes.

Regards,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
raju
Top achievements
Rank 2
answered on 27 Apr 2009, 02:56 AM
Hello Steve,

       Thank you for the sample project, that was exactly what I was looking for. Btw the cause of the error was my some of my telerik reporting dll's were not update to the latest version, after re-running the auto update, then it worked well.

        Just one more question to follow up, in the windows.Reportviewer, I can get the Export event, but for the webform.Reportviewer this is not available, is there a plan to exposing this event for the webform.reportviewer? The reason for this is that I would be able to customize the behavior of the export while still using the built in reportviewer export event instead of having an outside button that creates a new event for export.

Thanks.
0
Steve
Telerik team
answered on 27 Apr 2009, 06:15 AM
Hello raju,

I'm glad my sample helped!
Yes there are plans to expose the same events for the web report viewer as well, however in order to do that we need to do some major changes to it, which is not that trivial. Anyway we have this in mind and once we start working on it, it would be reflected on our RoadMap.

Best wishes,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
General Discussions
Asked by
raju
Top achievements
Rank 2
Answers by
Steve
Telerik team
raju
Top achievements
Rank 2
Share this question
or