This is a migrated thread and some comments may be shown as answers.

SettingsButton of PrintPreviewDialog causes Exception

5 Answers 221 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Li
Top achievements
Rank 1
Li asked on 27 Nov 2012, 11:32 AM
Hi,

I am using a PrintPreviewDialog, when I click on the Settings Button, I get the Excption below.
To open the Dialog I am only calling the PrintPreview() Method of an RadGridView. Thie error occurs in Telerik RadControls Q2 and Q3 2012 for Winforms. How can I avoid this error?

Kind Regards,
Li

Here is the ErrorMessage:

The value '0' is not a valid value for the enum 'PaperSourceKind'.

   at System.ComponentModel.EnumConverter.ConvertTo(ITypeDescriptorContext context, CultureInfo culture, Object value, Type destinationType)
   at System.ComponentModel.TypeConverter.ConvertToString(Object value)
   at System.Drawing.Printing.PaperSource.ToString()
   at Telerik.WinControls.UI.ListDataLayer.GetUnformattedValue(RadListDataItem item)
   at Telerik.WinControls.UI.RadListDataItem.SetDataBoundItem(Boolean dataBinding, Object value)
   at Telerik.WinControls.UI.ListControlListSource.InitializeBoundRow(RadListDataItem item, Object dataBoundItem)
   at Telerik.WinControls.Data.RadListSource`1.InitializeBoundRows()
   at Telerik.WinControls.Data.RadListSource`1.Initialize()
   at Telerik.WinControls.Data.RadListSource`1.Bind(Object dataSource, String dataMember)
   at Telerik.WinControls.Data.RadListSource`1.set_DataSource(Object value)
   at Telerik.WinControls.UI.ListDataLayer.set_DataSource(Object value)
   at Telerik.WinControls.UI.RadListElement.set_DataSource(Object value)
   at Telerik.WinControls.UI.RadDropDownListElement.set_DataSource(Object value)
   at Telerik.WinControls.UI.RadDropDownList.set_DataSource(Object value)
   at Telerik.WinControls.UI.PrintSettingsDialog.LoadSettings()
   at Telerik.WinControls.UI.GridViewPrintSettingsDialog.LoadSettings()
   at Telerik.WinControls.UI.PrintSettingsDialog.set_PrintDocument(RadPrintDocument value)
   at Telerik.WinControls.UI.PrintSettingsDialog..ctor(RadPrintDocument document)
   at Telerik.WinControls.UI.GridViewPrintSettingsDialog..ctor(RadPrintDocument document)
   at Telerik.WinControls.UI.RadGridView.Telerik.WinControls.UI.IPrintable.GetSettingsDialog(RadPrintDocument document)
   at Telerik.WinControls.UI.RadPrintPreviewDialog.OnShowPrintSettingsDialog()
   at Telerik.WinControls.UI.RadPrintPreviewDialog.buttonSettings_Click(Object sender, EventArgs e)
   at Telerik.WinControls.RadElement.OnMouseDown(MouseEventArgs e)
   at Telerik.WinControls.RadItem.OnMouseDown(MouseEventArgs e)
   at Telerik.WinControls.RadElement.OnCLREventsRise(RoutedEventArgs args)
   at Telerik.WinControls.RadElement.OnBubbleEvent(RadElement sender, RoutedEventArgs args)
   at Telerik.WinControls.RadItem.OnBubbleEvent(RadElement sender, RoutedEventArgs args)
   at Telerik.WinControls.RadElement.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
   at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
   at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
   at Telerik.WinControls.RadElement.DoMouseDown(MouseEventArgs e)
   at Telerik.WinControls.RadElement.CallDoMouseDown(MouseEventArgs e)
   at Telerik.WinControls.ComponentInputBehavior.OnMouseDown(MouseEventArgs e)
   at Telerik.WinControls.RadControl.OnMouseDown(MouseEventArgs e)
   at Telerik.WinControls.UI.RadCommandBar.OnMouseDown(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at Telerik.WinControls.RadControl.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

5 Answers, 1 is accepted

Sort by
0
Li
Top achievements
Rank 1
answered on 29 Nov 2012, 12:56 PM
Hi,

I found out, that this error does not occur when I change the standard printer.
This helps, but is there a way to avoid this exception?

Kind regards,
Li
0
Ivan Todorov
Telerik team
answered on 30 Nov 2012, 11:03 AM
Hello Li,

Thank you for contacting us.

We have had a few reports for such issue but we have not been able to reproduce it locally so far. In all the previous cases, it was related to the HP Universal Print Driver PCL 6 under Windows XP. If you have such driver installed, please try updating it to the latest version. Otherwise, please provide us with details about the version of your operating system, the printers installed and the default printer used. This might help us reproduce the issue locally and investigate it further.

Looking forward to hearing from you.

Kind regards,
Ivan Todorov
the Telerik team
Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
0
Li
Top achievements
Rank 1
answered on 03 Dec 2012, 10:25 AM
Hi Ivan,

the printer, where the error occurs when it is the standard printer is an Ricoh MP 2550.
The driver is the one you mentioned: "PCL6 Driver for Universal Print".

A printer which works as standard printer is the HP LaserJet P3005.
Here, the driver is HP LaserJet P3005 PCL 6.

I am running Windows 7 Prefessional.

Kind regards,
Li
0
Ivan Todorov
Telerik team
answered on 06 Dec 2012, 09:10 AM
Hello Li,

I have tried installing the mentioned printer driver and use it as a default printer, but I was not able to reproduce the issue. Can you please try updating your drivers to the latest version and see if the issue persists. I have downloaded the drivers from this site. Also, can you confirm if you are using the 32 or 64 bit version of Windows 7.

Thank you for your cooperation. Looking forward to hearing from you.

Regards,
Ivan Todorov
the Telerik team
Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
0
Li
Top achievements
Rank 1
answered on 10 Dec 2012, 10:58 AM
Hi Ivan,

thank for your efforts.
I will try to install the newest version of the driver.
I am using a 64 bit System.

Kind regards,
Li
Tags
General Discussions
Asked by
Li
Top achievements
Rank 1
Answers by
Li
Top achievements
Rank 1
Ivan Todorov
Telerik team
Share this question
or