locked
How to add Header in Report RRS feed

  • Question

  • User491718545 posted

    Hi 

    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');
    prtwin.print();

    document.body.innerHTML = originalContents;


    });

    Thanks

    Tuesday, February 18, 2014 1:01 AM

Answers

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

    Hi,

    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>
    </head>

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

    http://www.daedtech.com/adding-a-second-header-to-an-asp-net-gridview

    http://stackoverflow.com/questions/18327749/how-to-add-header-and-subheader-in-gridview

    Regards


     

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