System.ArgumentNullException System.Drawing.Graphics FromHdc(IntPtr)

Posted by: developers on 28 September 2021, 3:01 am EST

  • Posted 28 September 2021, 3:01 am EST

    Hello,

    we use Active Reports 14 and have a problem with printing.

    When calling SystemPrinter StartJob, sometimes the following error message is displayed.

    System.ArgumentNullException*System.Drawing.Graphics FromHdc(IntPtr)*Value cannot be null.
    Parametername: hdc*   at System.Drawing.Graphics.FromHdc(IntPtr hdc)
       at GrapeCity.ActiveReports.SystemPrinter.CreateHdc()
       at GrapeCity.ActiveReports.SystemPrinter.StartJob(String printJob)
    

    What can be the cause?

    Thanks

  • Posted 1 October 2021, 8:12 am EST

    This error generally occurs when the system runs out of memory. Please make sure you’re disposing the objects once printing is complete. You can also download the latest version of ActiveReports i.e v15 and check if you’re still getting the error:

    https://cdn.grapecity.com/ActiveReports/ar15/ActiveReports15_v15.2.0.1.exe

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels