Print Preview Unhandled Exception

For complex topics that regular users would not be interested in. For power users and database administrators.
Post Reply
SpeedGP
Posts: 26
Joined: Wed Jun 15, 2011 7:37 am

Print Preview Unhandled Exception

Post by SpeedGP » Fri Jul 13, 2012 11:13 am

We've run into this problem in the past before, its a "Per-User" problem and I believe it has happened on Win7 and WinXP machines. The only way (so far) I've figured out to fix it is to delete the user account and recreate it. It seems to be random and once it happens, it is stuck for that user account until the account is deleted and recreated. When the user goes to any type of print preview in OpenDental, IE "Recall > Postcard Preview" or "Reports > Production and Income > Today" etc. they get an Unhandled Exception and it says "Document cannot be displayed". Here is the info:

----------------------------------------------------------------------------------------

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: Parameter is not valid.
at System.Drawing.Imaging.Metafile..ctor(IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type, String desc)
at System.Drawing.Imaging.Metafile..ctor(IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type)
at System.Drawing.Printing.PreviewPrintController.OnStartPage(PrintDocument document, PrintPageEventArgs e)
at System.Windows.Forms.PrintControllerWithStatusDialog.OnStartPage(PrintDocument document, PrintPageEventArgs e)
at System.Drawing.Printing.PrintController.PrintLoop(PrintDocument document)
at System.Drawing.Printing.PrintController.Print(PrintDocument document)
at System.Drawing.Printing.PrintDocument.Print()
at System.Windows.Forms.PrintPreviewControl.ComputePreview()
at System.Windows.Forms.PrintPreviewControl.CalculatePageInfo()
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5448 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
OpenDental
Assembly Version: 7.8.25.0
Win32 Version: 7.8.25.0
CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/OpenDental.exe
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5447 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5446 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
CodeBase
Assembly Version: 7.1.0.0
Win32 Version: 7.1.0.0
CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/CodeBase.DLL
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
OpenDentBusiness
Assembly Version: 7.8.25.0
Win32 Version: 7.8.25.0
CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/OpenDentBusiness.DLL
----------------------------------------
SparksToothChart
Assembly Version: 4.7.1.0
Win32 Version: 4.7.1.0
CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/SparksToothChart.DLL
----------------------------------------
Microsoft.DirectX.Direct3D
Assembly Version: 1.0.2902.0
Win32 Version: 9.05.132.0000
CodeBase: file:///C:/Windows/assembly/GAC/Microsoft.DirectX.Direct3D/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.Direct3D.dll
----------------------------------------
xImageDeviceManager
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/xImageDeviceManager.DLL
----------------------------------------
SigPlusNET
Assembly Version: 1.0.2245.36238
Win32 Version:
CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/SigPlusNET.DLL
----------------------------------------
AxInterop.AcroPDFLib
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/AxInterop.AcroPDFLib.DLL
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
MySql.Data
Assembly Version: 6.2.4.0
Win32 Version: 6.2.4.0
CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/MySql.Data.DLL
----------------------------------------
System.Transactions
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
Oracle.DataAccess
Assembly Version: 2.112.2.0
Win32 Version: 2.112.2.0
CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/Oracle.DataAccess.DLL
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
CDT
Assembly Version: 7.4.1.0
Win32 Version: 7.4.1.0
CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/CDT.DLL
----------------------------------------
Microsoft.DirectX
Assembly Version: 1.0.2902.0
Win32 Version: 5.04.00.2904
CodeBase: file:///C:/Windows/assembly/GAC/Microsoft.DirectX/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.dll
----------------------------------------
Tao.OpenGl
Assembly Version: 2.1.0.4
Win32 Version: 2.1.0.4
CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/Tao.OpenGl.DLL
----------------------------------------
Tao.Platform.Windows
Assembly Version: 1.0.0.4
Win32 Version: 1.0.0.4
CodeBase: file:///C:/Program%20Files%20(x86)/Open%20Dental/Tao.Platform.Windows.DLL
----------------------------------------
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


-----------------------------------------------------------------------------------------------

Any idea other than deleting the user's account? Do you need any more info?



Thanks,

James

SpeedGP
Posts: 26
Joined: Wed Jun 15, 2011 7:37 am

Re: Print Preview Unhandled Exception

Post by SpeedGP » Fri Jul 13, 2012 11:19 am

I have also tried reinstalling OpenDental and reinstalling Adobe Reader (assuming that is what is used to display the print preview).

SpeedGP
Posts: 26
Joined: Wed Jun 15, 2011 7:37 am

Re: Print Preview Unhandled Exception

Post by SpeedGP » Thu Jul 19, 2012 8:54 am

Bump?

SpeedGP
Posts: 26
Joined: Wed Jun 15, 2011 7:37 am

Re: Print Preview Unhandled Exception

Post by SpeedGP » Tue Jul 24, 2012 12:00 pm

I finally fixed the problem by uninstalling all ".Net" references, OpenDental, and CutePDF Writer (just for fun), in "Add/Remove Programs", rebooted, (for some reason Windows Updates broke and I had to fix that too), reinstalled all updates, .Net, and OpenDental, and that seems to fix the problem.

d2dental
Posts: 31
Joined: Wed Sep 01, 2010 10:00 pm
Location: Mumbai, India
Contact:

Re: Print Preview Unhandled Exception

Post by d2dental » Tue Dec 16, 2014 3:45 am

is there simple solution. I am getting this when trying generate reports. it shows printer not installed, though its daily production or procedure report. happening after installing 14.3.24 update (foreign version).

User avatar
jsalmon
Posts: 1553
Joined: Tue Nov 30, 2010 12:33 pm
Contact:

Re: Print Preview Unhandled Exception

Post by jsalmon » Tue Dec 16, 2014 9:03 am

Install a printer or set the Windows XPS printer as your default printer. The reports use the printers to get margins and such so they know how to best make your print preview look.
The best thing about a boolean is even if you are wrong, you are only off by a bit.

Jason Salmon
Open Dental Software
http://www.opendental.com

Post Reply