Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Good evening

I am developing an application is asp.net and I got stuck at a point in the report page. I have made a Report.aspx page. the contents of the page are

1. A background picture control which contains the Letter Head (to be printed directly via browser)
2. A GridView, aligned with the letter head, which in bound to a database table.

My problem is that the space available in the letter head is limited. Is it possible if the number of rows in the GridView is more the, lets say, 10, the full letter head gets repeated automatically below the existing one to accommodate the additional rows?

The conclusion is that in the end I should be able to get multiple page printed report, with the contents synchronized with letter head. Any idea of how to achieve that? If my approach is not practical, what is the right approach to solve this problem?

Thanking in anticipation

Update:
For better understanding, please see the image on the following link
http://s24.postimg.org/p286y1cl1/Query.jpg
Posted
Updated 24-Jun-13 7:18am
v3
Comments
PrissySC 24-Jun-13 11:13am    
Confused .... letter head - you have a page header created on the report yes?

Space available is what ever size you set during the report creation. Also, are you using the report viewer?

Clarify exact output and what your current result is at this time. As well, specify if you are client side or server side. This will enable a better response.
Aamir_shah 24-Jun-13 13:25pm    
I appreciate your efforts to solve my problem. Please refer to the Image for further clarification of my question.

Thanks
Aamir_shah 24-Jun-13 13:26pm    
P.S: i am not using any report view.

1 solution

I think what you're missing is the media elements in css.

The following explains how to add a report footer... with a small adjustment, which is explained in the article a header too.

When you create CSS you can set the media type:

CSS
@media screen { .myCSSClass { } }
@media print { .myCSSClass { } }


This forces different css styles for on the screen and printing.

Setting position to fixed and then setting the top for a header or the bottom for a footer, you can force a specific bit of HTML to reprint on every page when it prints.

By setting a different style for both screen and print media types you can get a header which appears just once on the screen but on every page when you print.

CSS
@media screen {
    div.divHeader {
        position: relative;
    }
}
@media print {
    div.divHeader {
        position: fixed;
        top: 0;
    }
}


Here is the article:

http://stackoverflow.com/questions/1360869/html-print-header-footer[^]
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900