Ever tryed to use web browser coponent on window forms?
It works by using COM interop (AxInterop.SHDocVw.dll)
But I always get exceptions when I use it! Try it, create an empty winfws form, add web browser control to it and turn on "break on CRL exceptions". When program gets to instruction
((System.ComponentModel.ISupportInitialize)(this.axWebBrowser1)).EndInit();
error message:
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in system.windows.forms.dll
Additional information: Unknown error
I used to ignore this error while it didn't affect my program.
But since I've installed the latest Crystal reports servie packs, I can't use reports any more! ![]()
It fails when a program calls:
CrystalDecisions.CrystalReports.Engine.ReportDocument r =
new CrystalDecisions.CrystalReports.Engine.ReportDocument();
And the error:
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in crystaldecisions.crystalreports.engine.dll
Additional information: Unknown error
I spent days investigating what was the cause! And I found out that if I outcomment all the web browser related stuff, crystal reports work as they used to!?
I guess web browser somehow corrupts COM interop and that's why crystal (which also uses interop!) fails.
I'm stucked now. I must have browser control in my application (since previous versions do), but obviously I also need reports. Reverting to previous crystal reports version didn't help (using crystal's restore.exe).
(b) If you find a solution, the beer's on me ![]()
J
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.