Using the Schema Compare Tool:
1. Compare two schemas
2. View results on-screen
3. Select File | Print Preview which results in the following Exception error
**********************************************************************
Exception Information
**********************************************************************
Exception: System.InvalidCastException
Message : Unable to cast object of type 'DevExpress.XtraReports.UI.ReportPrintContextWin' to type 'DevExpress.XtraReports.UI.ReportPrintContext'.
Stack Trace:
at DevExpress.XtraReports.UI.ReportRuntime.ContextDictionary`1.CreateInstance(String asmName, String typeName)
at DevExpress.XtraReports.UI.ReportRuntime.ContextDictionary`1.GetContext(Type reportType)
at DevExpress.XtraReports.UI.ReportRuntime.CreatePrintTool(XtraReport report)
at DevExpress.XtraReports.UI.XtraReport.get_ReportPrintTool()
at DevExpress.XtraReports.UI.XtraReport.ShowPreviewDialog()
at Quest.Schema.MSSQL.ComparePlugin.SchemaCompareDocument.DoPrintPreview()
at Quest.Toad.Gui.MainForm.printPreviewButton_ItemClick(Object sender, ItemClickEventArgs e)
at DevExpress.XtraBars.BarItem.OnClick(BarItemLink link)
at DevExpress.XtraBars.BarBaseButtonItem.OnClick(BarItemLink link)
at DevExpress.XtraBars.BarItemLink.OnLinkClick()
at DevExpress.XtraBars.BarItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
at DevExpress.XtraBars.BarButtonItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
at DevExpress.XtraBars.BarItemLink.OnLinkActionCore(BarLinkAction action, Object actionArgs)
at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.ClickLink(BarItemLink link)
at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.UnPressLink(BarItemLink link)
at DevExpress.XtraBars.Controls.CustomLinksControl.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.W
WORKAROUND
Please raise a formal case with Quest Support (support.quest.com) and request file 'Toad.exe.config' be sent to you. Refer to this solution (SOL84111)
Once you have received this from Support, close Toad
Rename the 'Toad.exe.config' to 'Toad.exe.config_bak' in your Toad installation folder (C:\Program Files\Quest Software\Toad for SQL Server 5.5 or 5.6) if it exists.
Place the new 'Toad.exe.config' in the Toad installation folder
Launch Toad and retest
STATUS
Waiting for fix in a future release of Toad for SQL Server
Issue also occurs when exporting or printing results from SQL Server Discovery.
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center