Home Forums WinForms controls Xceed Chart for WinForms Print Manager Error "Parameter is not valid"

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #18935 |

    I am having issues using the print button on the Chart Print Manageer dialog.  I am getting the following error when i try to print directly from the manager interface.  Any suggestions as to the issue?  Has anyone else seen this?

    ************** Exception Text **************
    System.ArgumentException: Parameter is not valid.
       at System.Drawing.Graphics.GetHdc()
       at Xceed.Chart.GraphicsGL.GLDevice.RenderLargeBitmap(Bitmap pBitmap)
       at Xceed.Chart.GraphicsGL.GLDevice.RenderToBitmap(Bitmap pBitmap)
       at Xceed.Chart.PrintManager.RenderToBitmap(PrintDocument printDocument)
       at Xceed.Chart.PrintManagerDialog.UpdatePrintPreview(Boolean bUpdatePreviewChart)
       at Xceed.Chart.PrintManagerDialog.UpdatePrinterDependentSettings()
       at Xceed.Chart.PrintManagerDialog.InstalledPrintersCombo_SelectedIndexChanged(Object sender, EventArgs e)
       at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
       at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
       at System.Windows.Forms.ComboBox.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)

     

    Chart components being used 

     —————————————-
    Xceed.Chart
        Assembly Version: 4.1.100.0
        Win32 Version: 4.1.7467.13300
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Xceed.Chart/4.1.100.0__ba83ff368b7563c6/Xceed.Chart.dll

    —————————————-
    Xceed.Chart.GraphicsCore
        Assembly Version: 4.1.100.0
        Win32 Version: 4.1.7467.13300
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Xceed.Chart.GraphicsCore/4.1.100.0__ba83ff368b7563c6/Xceed.Chart.GraphicsCore.dll
    —————————————-
    Xceed.Chart.Standard
        Assembly Version: 4.1.100.0
        Win32 Version: 4.1.7467.13300
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Xceed.Chart.Standard/4.1.100.0__ba83ff368b7563c6/Xceed.Chart.Standard.dll
    —————————————-
    Xceed.Chart.Utilities
        Assembly Version: 4.1.100.0
        Win32 Version: 4.1.7467.13300
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Xceed.Chart.Utilities/4.1.100.0__ba83ff368b7563c6/Xceed.Chart.Utilities.dll
    —————————————-
    Xceed.Chart.Core
        Assembly Version: 4.1.100.0
        Win32 Version: 4.1.7467.13300
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Xceed.Chart.Core/4.1.100.0__ba83ff368b7563c6/Xceed.Chart.Core.dll
    —————————————-
    Xceed.Chart.GraphicsGL
        Assembly Version: 4.1.100.0
        Win32 Version: 4.1.7467.13300
        CodeBase: file:///C:/WINDOWS/assembly/GAC_32/Xceed.Chart.GraphicsGL/4.1.100.0__ba83ff368b7563c6/Xceed.Chart.GraphicsGL.dll

    —————————————-
    Xceed.Chart.Graphics2D
        Assembly Version: 4.1.100.0
        Win32 Version: 4.1.7467.13300
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Xceed.Chart.Graphics2D/4.1.100.0__ba83ff368b7563c6/Xceed.Chart.Graphics2D.dll

     

     

    Imported from legacy forums. Posted by David (had 2533 views)

    User (Old forums)
    Member
    Post count: 23064

    At this point, this is not something we can reproduce.

    Imported from legacy forums. Posted by André (had 436 views)

    User (Old forums)
    Member
    Post count: 23064

    I have the exact same error…I can’t get any information out of the exception either.  I do know that I didn’t used to have this problem, but now I do.  Version Xceed.Chart for .NET Windows Forms v 4.2.100.0

    My code:

                Dim ChartPrinter As Xceed.Chart.PrintManager = uxChart12MonthRolling.PrintManager

                With ChartPrinter
                    .PrintBackgroundFrame = False
                    .Landscape = True
                    .Print()
                End With

    In fact, even in the VS 2008 IDE, if select “Print…” from the Properties window of via smart tag, I get the exact same error.  Is there a fix for this?

    Imported from legacy forums. Posted by Rob (had 601 views)

    User (Old forums)
    Member
    Post count: 23064

    What seems to be causing this problem is the transparency setting and using Color.Transparent.

     I found a workaround:

                 ‘ BUG in xceed Chart 4.2.100.0 with TransparentBackground must to white and then set back to later on.
                uxChart12Rolling.Settings.TransparentBackground = False
                uxChart12uxChart12Rolling.BackColor = Color.White

                Dim ChartPrinter As Xceed.Chart.PrintManager = uxChart12Rolling.PrintManager

                With ChartPrinter
                    .Landscape = True
                    .Print()
                End With

                ‘ BUG in xceed Chart 4.2.100.0 with TransparentBackground – reset back to Transparent.
                uxChart12Rolling.Settings.TransparentBackground = True
                uxChart12Rolling.BackColor = Color.Transparent

    When in VS 2008 IDE /Designer, make sure that these setting are false and not transparent.

    Rob

    Imported from legacy forums. Posted by Rob (had 831 views)

    User (Old forums)
    Member
    Post count: 23064

    On our side, we can’t still reproduce this issue, whatever the settings, it prints fine.

    If any one can provide a sample application reproducing the issue, we will be glad to investigate this further.

    Imported from legacy forums. Posted by André (had 2130 views)

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.