Print Error

edited March 2010 in FastReport .NET
hi,
we have a D-Link DP 300+ Server printer at the print time we catch this error
"the data ara passed to a system call is too small"
thanks

Comments

  • edited 10:13AM
    Hello,

    What is your OS? Are you able to print from other .net applications?
  • edited 10:13AM
    Hello,

    My OS : XP
    yes I can print from Other App.
    such as msWord,..
  • edited 10:13AM
    MS Word is not .net app.
    Try to run the attached example and print. Are you able to do that?
  • edited 10:13AM
    oh .net app. ok .
    when I run the exe I catch an error with this StackTrace


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

    ************** Exception Text **************
    System.Drawing.Printing.InvalidPrinterException: No printers are installed.
    at System.Drawing.Printing.PrinterSettings.GetHdevmodeInternal()
    at System.Drawing.Printing.PrinterSettings.GetHdevmode(PageSettings pageSettings)
    at System.Drawing.Printing.PrintController.OnStartPrint(PrintDocument document, PrintEventArgs e)
    at System.Windows.Forms.PrintControllerWithStatusDialog.OnStartPrint(PrintDocument document, PrintEventArgs e)
    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.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    WindowsApplication5
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Documents%20and%20Settings/myUser/Desktop/WindowsApplication5.exe
    System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.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.

  • edited 10:13AM
    when I run demo - when I Select the printer I catch an error with this StackTrace

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

    ************** Exception Text **************
    System.ComponentModel.Win32Exception: The data area passed to a system call is too small
    at System.Drawing.Printing.PrinterSettings.GetHdevmodeInternal()
    at System.Drawing.Printing.PrinterSettings.GetHdevmode()
    at System.Drawing.Printing.PageSettings.GetPaperSize(IntPtr modeHandle)
    at System.Drawing.Printing.PageSettings.get_PaperSize()
    at gNTDTTtzOd6FoGqXZX3.2fbRfKtniAQJ8HSlaPQ.q9hDMfqYW(Object , EventArgs )
    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)


    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    Demo
    Assembly Version: 1.0.199.0
    Win32 Version: 1.0.199.0
    CodeBase: file:///C:/Program%20Files/FastReports/FastReport.Net%20Demo/Demo.exe
    System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    FastReport
    Assembly Version: 1.0.199.0
    Win32 Version: 1.0.199.0
    CodeBase: file:///C:/Program%20Files/FastReports/FastReport.Net%20Demo/FastReport.DLL
    FastReport.Dock
    Assembly Version: 1.0.199.0
    Win32 Version: 1.0.199.0
    CodeBase: file:///C:/Program%20Files/FastReports/FastReport.Net%20Demo/FastReport.Dock.DLL
    System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.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.


  • edited 10:13AM
    Hello,

    Sorry, I cannot help you with this problem. It seems it's a problem with the printer driver.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.