Hello..
I have a grid view which consists of some 16 fields in which i have to take print in A4 sheet
in which every sheet the page must contain headers
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Report_AssistantEngineer.aspx.cs" Inherits="Report_AssistantEngineer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2 align="center">Assistant Engineer Report</h2>
<div id="grid">
<br />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
AllowPaging="True" AllowSorting=True xmlns:asp="#unknown"
onpageindexchanging="GridView1_PageIndexChanging">
<AlternatingRowStyle Font-Names="Calibri" Font-Size="Smaller" />
<Columns>
<asp:BoundField DataField="Reg_no" HeaderText="Reg No"
SortExpression="Reg_no" >
<HeaderStyle HorizontalAlign="Center" Width="30px" />
<ItemStyle HorizontalAlign="Center" Width="30px" />
</asp:BoundField>
<asp:TemplateField HeaderText="Photo Signature">
<EditItemTemplate>
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Image ID="Image1" runat="server"
ImageUrl='<%# "~/Photo.ashx?id=" + Eval("Reg_no") + "&post=assistant_engineer" %>'
Height="50px" ImageAlign="Middle" Width="50px"/>
<br />
<asp:Image ID="Image2" runat="server"
ImageUrl='<%# "~/Signature.ashx?id=" + Eval("Reg_no") + "&post=assistant_engineer" %>'
Height="20px" ImageAlign="Left" Width="60px"/>
</ItemTemplate>
<HeaderStyle Width="70px" />
<ItemStyle Width="70px" HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Candidate /Father_Name">
<EditItemTemplate>
<asp:TextBox ID="TextBox4" runat="server" Text='<%# Eval("candidate_name")%>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label6" runat="server" Text='<%# Eval("candidate_name") %>'></asp:Label>
<br />
<br />
<asp:Label ID="Label9" runat="server" Text='<%# Eval("father_name")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" Width="200px" Wrap="True" />
<ItemStyle HorizontalAlign="Left" Wrap="True" Width="200px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="DOB Age">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("dob","{0:d}") %>'></asp:Label>
<br />
<asp:Label ID="Label3" runat="server" Text='<%# Eval("age")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" Width="40px" />
<ItemStyle HorizontalAlign="Center" Width="50px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Address">
<EditItemTemplate>
<asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("address") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label7" runat="server" Text='<%# Eval("address").ToString().Replace(",", Environment.NewLine.ToString() ) %>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" Width="200px" />
<ItemStyle HorizontalAlign="Center" Width="200px" />
</asp:TemplateField>
<asp:BoundField DataField="gender" HeaderText="Gender" >
<HeaderStyle HorizontalAlign="Center" Width="30px" />
<ItemStyle HorizontalAlign="Center" Width="30px" />
</asp:BoundField>
<asp:BoundField DataField="clamed" HeaderText="Res'tion Claimed" >
<HeaderStyle HorizontalAlign="Center" Width="30px" />
<ItemStyle HorizontalAlign="Center" Width="30px" />
</asp:BoundField>
<asp:BoundField DataField="eligible" HeaderText="Res'tion Eligible" >
<HeaderStyle HorizontalAlign="Center" Width="30px" />
<ItemStyle HorizontalAlign="Center" Width="30px" />
</asp:BoundField>
<asp:BoundField DataField="horizontal_reservation"
HeaderText="Hor'tal Res'tion">
<HeaderStyle HorizontalAlign="Center" Width="30px" />
<ItemStyle HorizontalAlign="Left" Width="30px" />
</asp:BoundField>
<asp:TemplateField HeaderText="Academic Qualfication (BE)">
<EditItemTemplate>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# "Max: " + Eval("BE_max_marks") %>'></asp:Label>
<br />
<asp:Label ID="Label4" runat="server" Text='<%# "Obt: " + Eval("BE_marks_obtained") %>'></asp:Label>
<br />
<asp:Label ID="Label5" runat="server" Text='<%# "Per: " + Eval("BE_percentage_roundoff")+ " %" %>'></asp:Label>
<br />
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" Width="50px" />
<ItemStyle HorizontalAlign="Left" Width="50px" />
</asp:TemplateField>
<asp:BoundField DataField="experience" HeaderText="Experience"
SortExpression="experience" >
<HeaderStyle HorizontalAlign="Center" Width="40px" />
<ItemStyle HorizontalAlign="Center" Width="40px" />
</asp:BoundField>
<asp:BoundField DataField="required_documents"
HeaderText="Required Documents" >
<HeaderStyle HorizontalAlign="Center" Width="40px" />
<ItemStyle HorizontalAlign="Center" Width="40px" />
</asp:BoundField>
<asp:TemplateField HeaderText="DD No. /Date /Amount">
<EditItemTemplate>
<asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("dd_no_date") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<table>
<tr>
<td style=width:30px>
<asp:Label ID="Label8" runat="server" Text='<%# Eval("dd_no_date").ToString().Replace(" ", Environment.NewLine.ToString() ) %>'></asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" Width="20px" />
<ItemStyle HorizontalAlign="Center" Width="20px" />
</asp:TemplateField>
<asp:BoundField DataField="bank_branch" HeaderText="Bank Branch" >
<HeaderStyle HorizontalAlign="Center" Width="100px" />
<ItemStyle HorizontalAlign="Left" Width="100px" />
</asp:BoundField>
<asp:BoundField DataField="remarks" HeaderText="Remarks" >
<HeaderStyle HorizontalAlign="Center" Width="200px" />
<ItemStyle HorizontalAlign="Left" Width="200px" />
</asp:BoundField>
</Columns>
<HeaderStyle Font-Size="Small" />
<RowStyle Font-Names="Calibri" Font-Size="Smaller" />
</asp:GridView>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:BWSSBConnectionString %>"
SelectCommand="SELECT * FROM [assistant_engineer]"></asp:SqlDataSource>
</div>
</form>
</body>
</html>