How to add Header in Report RRS feed

  • Question

  • User491718545 posted


    this my coding How to header???

    i want to add Report headers in center alignment???

    $('#btnSubmit').on('click', function () {
    var printContents = document.getElementById('<%=GridView1.ClientID %>').outerHTML;
    var originalContents = document.body.innerHTML;
    document.body.innerHTML = printContents;
    var prtwin = window.print('', 'PrintGridViewData', 'left=100,top=100,width=1000,height=1000,tollbar=0,scrollbars=1,status=0,resizable=1');

    document.body.innerHTML = originalContents;



    Tuesday, February 18, 2014 1:01 AM


All replies

  • User-1941247845 posted

    What Report ? RDLC or Crystal Reports !!!!

    Both you have the designer window the format the same .

    Please elaborate on your requirement.

    Tuesday, February 18, 2014 1:46 AM
  • User-1818759697 posted


    For this situation, it seems that you try to print the page with a gridview in it, and now you want to add a header in the report. For print the page, it's easy to use the window.print() to print a document. To add the header in the page, you could simply add to the header tag:

    <head runat="server">
        <h1> style="text-align:center">This is the header</h1>

    Besides, if you want to add the header and subheader in the gridview, you could try to refer to the following information:





    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 19, 2014 1:56 AM