NotImplementedException during Export to PDF

6 posts, 0 answers
  1. raju
    raju avatar
    15 posts
    Member since:
    Feb 2009

    Posted 21 Apr 2009 Link to this post

    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


  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 21 Apr 2009 Link to this post

    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.
  3. DevCraft banner
  4. raju
    raju avatar
    15 posts
    Member since:
    Feb 2009

    Posted 21 Apr 2009 Link to this post

    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.
  5. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 24 Apr 2009 Link to this post

    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.
  6. raju
    raju avatar
    15 posts
    Member since:
    Feb 2009

    Posted 26 Apr 2009 Link to this post

    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.
  7. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 27 Apr 2009 Link to this post

    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.
Back to Top
DevCraft banner