Showing posts with label page break. Show all posts
Showing posts with label page break. Show all posts

Friday, August 16, 2013

Page Break in HTML Reporting ASP .NET

  static int ROW_PER_PAGE = 22;// variable for no. of Rows per page
void generatereport()

foreach(DataRow dr in dtbl.Rows)
{
if (k % ROW_PER_PAGE == 0 && k > 0)
 {
                        Response.Write("<tr height=300><td colspan=6 \"text-align:Center; \" valign=\"top\">cont.. </td></tr>");
                        Response.Write("</table>");// end of previous page table
Response.Write("<div \sty\le= 'page-break-after:always'></div>"); //for page Break style ha \ for escape                                                                                                     //sequence get rid of that to use the code
Start New Table and Report Header for new page here
}//end of if

continue with the loop
K++;
}
}