You need to sign in to do that
Don't have an account?
Dispalying more than 1000 records in to pdf.
hi
i am one requirement , i have to display all values in accounts. I am posting my controller & visualforce page.
public class Raja_Test{
public Raja_Test(ApexPages.StandardController controller)
{ }
public String[] states {get;set;}
public Account[] ac {get;set;}
public Raja_Test()
{
ac = [Select id,name,Bill_To__c,Bill_To__r.Name from account where Bill_To__c != NULL ];
Set<String> stateSet = new Set<String>();
for(Account a : ac)
stateSet.add(a.Bill_To__r.Name);
states = new String[stateSet.size()];
Integer i = 0;
for (String state : stateSet) {
states[i] = state;
i++;
}
states.sort();
}
}
Visulforce Page :
<apex:page Controller="Raja_Test"> <table border = '1'> <apex:repeat value="{!states}" var="a"> <tr> <td>{!a}</td> <tr> <td> <apex:repeat value="{!ac}" var="a1"> <apex:outputPanel rendered="{!IF((a1.Bill_To__r.Name = a) ,true,false)}" > <td>{!a1.name}</td> </apex:outputPanel> </apex:repeat> </td></tr> </tr> </apex:repeat> </table> </apex:page>
Can any one help on this
What is the error message you are getting?
Collection size 1,024 exceeds maximum size of 1,000.
You can only have 1,000 items in a list. Instead, use a nested list, which gives you a collective 1,000,000 items that you can store. You'll meet your heap/query limits before this limit, so it happens to be a lot better. The page looks like this:
try this as this is a new release you can have this from 23.0 only
readOnly attribute on apex:page component using this you can render 10k records
like this
<apex:page controller="MerchandiseController" readOnly="true">
<p>Here is all the merchandise we have:</p>
<apex:dataTable value="{!AllMerchandise}" var="product">
<apex:column>
<apex:facet name="header">Product</apex:facet>
<apex:outputText value="{!product.Name}" />
</apex:column>
</apex:dataTable>
</apex:page>
controler:
public class MerchandiseController {
public List<Merchandise__c> getAllMerchandise() {
List<Merchandise__c> theMerchandise =[SELECT Name, Price__c FROM Merchandise__c LIMIT 10000];return(theMerchandise);}
}
it is hitting error as :
Error: Unsupported attribute readonly in <apex:page> in Merchandise at line 1 column 63
thats y i told you it is supported in api version 23.0 .. just check with your sandbox is updated to 23.0 r not