Click here to Skip to main content
12,630,940 members (31,131 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C#
Print the Content of GropBox
The size of GroupBox is More than the size of the Form.
The size of GroupBox Depends on the number of records retrieved from Database.
If the records retrieved are more then only one page is printed and rest of the records are skiped.
Please Help
private void Design_PrintDocument_PrintPage(object sender, PrintPageEventArgs e)
        {
            Bitmap bm = new Bitmap(this.Report_GroupBox.Width, this.Report_GroupBox.Height);
            Report_GroupBox.DrawToBitmap(bm, new Rectangle(0, 0, this.Report_GroupBox.Width, this.Report_GroupBox.Height));
            e.Graphics.DrawImage(bm, 0, 0);
        }
Posted 11-Oct-12 1:42am
Updated 11-Oct-12 1:55am
v2
Comments
Sergey Alexandrovich Kryukov 15-Oct-12 18:22pm
   
Not a question. Help with what?
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.161205.3 | Last Updated 11 Oct 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100