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
Manpreet Singh 13Manpreet Singh 13 

Replicate print view

Dear All,

I am stuck with building 'Print View'. I have brought all the necessary fields on custom visualforce page but need help with bringing related lists fields like print view. I am trying below code but it shows everything in tabular format and all activities (Open and Closed). I want separate section for open and closed activities. I am using standard case controller. Any input would be appreciated. Thank you.

<apex:pageBlockSection id="OpenActivites" columns="1" title="Activities" collapsible="true">
      <apex:pageBlockTable value="{!Case.Tasks}" var="item">
      <apex:column value="{!item.Subject}"/>
      <apex:column value="{!item.ActivityDate}"/>
      <apex:column value="{!item.OwnerId}"/>
      <apex:column value="{!item.Description}"/>
      <apex:column value="{!item.Status}"/>
      <apex:column value="{!item.CreatedById}"/>
      <apex:column value="{!item.CreatedDate}"/>
      </apex:pageBlockTable>
      
      </apex:pageBlockSection>