Skip to Content
avatar image
Former Member

External component has thrown an exception

Hi, several years ago we start to built a class library with Visual Studio 2012 for "Microsoft.NET Framework 2.0" and "SAP Crystal Reports runtime engine for .NET Framework (32-bit) version". The library with enabled "COM visibility" has functionality to print reports to a printer and the ability to open the CrystalDecisions.Windows.Forms.CrytsalReportsViewer on a report file. We could handle reports with included database connectivity and reports with ado net xml data. Now, I've migrated the library with Visual Studio 2015 to "Microsoft.NET Framework 4.0" and and "SAP Crystal Reports runtime engine for .NET Framework (32-bit) version". For most of my tests, I have the following exception for both cases: opening the report viewer or printing to printer. Some tests are successful, and, additional, the earlier failed tests are successful. System.Runtime.InteropServices.SEHException (0x80004005): Eine externe Komponente hat eine Ausnahme ausgelöst. bei CrystalDecisions.Shared.PageRender.MeasureStringAccurate(String text, Font font, SizeF layoutArea, StringFormat format, Graphics g) bei CrystalDecisions.Shared.PageRender.draw_FieldObjectInstance(FieldObjectInstance fieldObject, Graphics g) bei CrystalDecisions.Shared.PageRender.draw_ReportObjectInstance(ReportObjectInstance instance, Graphics g, Rectangle clipRect) bei CrystalDecisions.Shared.PageRender.draw_SectionInstance(SectionInstance section, Graphics g, Rectangle clipRect) bei CrystalDecisions.Shared.PageRender.Render(PageObject page, Graphics g, Graphics device_g) bei CrystalDecisions.Windows.Forms.PageControl.OnPaint(PaintEventArgs e) bei System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer) bei System.Windows.Forms.Control.WmPaint(Message& m) bei System.Windows.Forms.Control.WndProc(Message& m) bei System.Windows.Forms.ScrollableControl.WndProc(Message& m) bei System.Windows.Forms.ContainerControl.WndProc(Message& m) bei System.Windows.Forms.UserControl.WndProc(Message& m) bei CrystalDecisions.Windows.Forms.PageControl.WndProc(Message& m) bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) I've rebuilded the functionality as an executable with an additional main view and I never got an error. A web search of the problem did not lead to fitting current results. Does somebody have an idea? Jörg

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    May 23, 2018 at 06:22 PM

    Then you should have a app.config with the versions that needs to be updated.

    Somewhere there should be a list of references 13.0.2000.0, they need to be updated with 13.0.3500.0

    Add comment
    10|10000 characters needed characters exceeded

  • May 17, 2018 at 04:30 PM

    Check your web.config file and verify all of the CR references are also 13.0.3500.0

    Search the whole PC for web.config files, sometimes some other app or left over file is being loaded rather than the one you need.


    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Sorry Don, no web app. The application which uses the com interface is a 32 bit "VA Smalltalk Runtime Startup" virtual machine. I've tested several microsoft operating systems (client and server) and there are no differences.