using OwnerPrintDraw with headers and footers

Posted by: constructiongirl on 8 September 2017, 1:27 pm EST

  • Posted 8 September 2017, 1:27 pm EST

    Hello,


    I have an application that is printing 2 sheets to the same page.  The first spreadsheet contains detailed information and may actually print over several pieces of paper.  The second spreadsheet contains totals, and is only 1 line.


    I have them printing nicely on the same page using the OwnerPrintDraw sample code on this forum.  The only thing missing is that my header and footer is not printing at all.  I set the header and footer in the PrintInfo object on each sheet, but it does not print.  When using OwnerPrintDraw, do you have to print the header and footer yourself in the OnPrintPage, by calling e.Graphics.DrawString?


     Any help is greatly appreciated!

  • Replied 8 September 2017, 1:27 pm EST

    CG -

    In the examples directory that ships with the product is an OwnerPrintDraw example.  You have to use the DrawString method...

    e.Graphics.DrawString(PatientTitle, PrinterFont, b, drect)
    e.Graphics.DrawString(DoctorTitle, PrinterFont, b, drect1)
    e.Graphics.DrawString("End of Reports", PrinterFont, b, drect2)

  • Replied 8 September 2017, 1:27 pm EST

    Hello,


    In addition to what Bob stated, you should be able to catch the PrintHeaderFooterArea event and add the code Bob gave you in this event.

Need extra support?

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

Learn More

Forum Channels