Trying to print XamDataGrid using sample code provided by the Feature browser. Get a nullreference exception 4 layers into the infragistics package...
StackTrace: at Infragistics.Windows.Reporting.Report.CreateAndInitializePrintDialog() at Infragistics.Windows.Reporting.Report.InitializeReport(Boolean showPrintDialog) at Infragistics.Windows.Reporting.Report.Print(Boolean showPrintDialog, Boolean showReportProgressControl, FrameworkElement reportProgressControlOwnedElement) at Infragistics.Windows.Reporting.Report.Print(Boolean showPrintDialog, Boolean showReportProgressControl) at Ability.PolicyAdmin.WPF.Views.PolicyPaymentListView.Button_Click(Object sender, RoutedEventArgs e) in C:\Visual Studio Projects 2008\PolicyAdmin20\Ability.PolicyAdmin.WPF\Views\PolicyPaymentListView.xaml.cs:line 60
Attempt to use demo in Feature Browser also results in failure of browser. Software is working on XP workstations in this office, but not on this one (Vista).
Anyone have any ideas????
I took a look at the code and it is making an bad assumption that a PrintDialog will not return null for its PrintQueue property.
However, if you don't have any printers installed it will return null.
I'll enter a bug for this but in the meantime you should be able to test for this situation by creating a new System.Windows.Controls.PrintDialog. If its PrintQueue property returns null then don't call the Report.Print method.