function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
srinivasusrinivasu 

how to display coulmn header values in all pages ?

Hi,

 

I have a requirement where I have to display the column name in all pages alongwith the respective column values.

I have to render a pdf page. It is like a printable view of a report.

I am getting the column names and all the values.

But the column names are only appearing in the first page and in the subsequent pages i am getting the values but under the same column and without the column name.

 

Is there anyway it can be handled in visualforce.

 

Thanks and regards

Srinivasu

Navatar_DbSupNavatar_DbSup

Hi,

 

You can use the below style sheet and div for repeat the Header in all pages

 

 

<style>
pre
{
white-space: -moz-pre-wrap; /* Mozilla, supported since 1999 */
white-space: -pre-wrap; /* Opera 4 - 6 */
white-space: -o-pre-wrap; /* Opera 7 */
white-space: pre-wrap; /* CSS3 - Text module (Candidate Recommendation) http://www.w3.org/TR/css3-text/#white-space */
word-wrap: break-word; /* IE 5.5+ */
}

 

 

@page :first
{

margin-top:0%;
@top-center
{
content: element(header2);
}
}

@page
{
margin-top: 15%;
@top-center
{
content: element(header1);
}

@bottom-right
{
content: "Page: " counter(page) " / " counter(pages);font-size: 80%;
}
}

div.header1
{
position: running(header1);
width:703px;
padding-left:9px;
}
div.header2
{
width:700px;
padding-bottom:0px;
padding-left:2px;

}

.table1Value{color: #333333; font-size: 70%;text-align: center;border-bottom:0px double #605E5E;}
</style>

<div class="header1" id="logo" width="100%">
<table width="100%" class="tableHValue" border="0">
<tr valign="bottom">
<th width="15%" align="left">Account</th><th width="12%">Location</th><th width="15%">Coverage</th><th width="12%">Status</th>
</tr>
</table>
<br/><br/>
</div>

 

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.