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
Compass 1Compass 1 

Unable to view full list of Opportunity on my VF Page

I wanted to create a VF Page to show full list of opportunities. But after excuted my page its shows only 19 records where I am having more than 100 records.
For reference find below my VF code,

---------------------------

<apex:page renderAs="pdf" StandardController="Opportunity" recordSetVar="opportunities"   tabStyle="Opportunity"
    sidebar="false" applyBodyTag="false" showHeader="false">

 <head>
   <style>
     @page{
        size: A4 landscape;
                  }
      .headerstyle
      {
      background:red;
      color:white;
      font-size:10pt;
      text-align:center;     
      }
      .tableClass
      {    
       font-size:8pt;
       border:1;
       border-spacing:2px;
       border-collapse:separate;   
      }
            
    </style>
<apex:form >

 <c:dynapdfcomponent type="header" > 
<div align="center" style="font-size:18.0pt;word-break:break-all">All Opportunities</div><hr style="color:#8A0808" />
</c:dynapdfcomponent>

<br /><br />
    
<apex:datatable value="{!opportunities}" var="opp" width="100%" styleClass="tableClass" border="1">

<apex:column value="{!opp.name}" headerClass="headerstyle" headerValue="Project Title"/>
<apex:column value="{!opp.account.name}"  headerClass="headerstyle" headerValue="Account Name"/>
<apex:column value="{!opp.Facility__c}"  headerClass="headerstyle" headerValue="Facility"/>
<apex:column value="{!opp.Scope_Of_Work__c}"  headerClass="headerstyle" headerValue="Scope Of Work"/>
<apex:column value="{!opp.Pricing_Type__c}" headerClass="headerstyle" headerValue="Pricing Type"/>
<apex:column value="{!opp.BiddingStatus__c}"  headerClass="headerstyle" headerValue="Bidding Status"/>
<apex:column value="{!opp.Estimated_Revenue_MM__c}" headerClass="headerstyle" headerValue="Revenue $M's"/>
<apex:column value="{!opp.Contract_Award_Date__c}" headerClass="headerstyle" headerValue="Contract Award Date"/>
    
</apex:datatable>   
   </apex:form>   
   </head>
</apex:page>
-----------------------------------
Dushyant SonwarDushyant Sonwar
you can only show 20 records at a time using recordsetvar use custom controller to show more...
SF AdminSF Admin
By default, a list controller returns 20 records on the page. To control the number of records displayed on each page, use a controller extension to set the pageSize.