+ Start a Discussion
Adam RycroftAdam Rycroft 

Help Displaying formula field in an apex:repeat

Hello,

I'm having trouble getting this VF page to render. The issue is I'm trying to display who created the record, but I get an error every time. The issue is with the  Approved by: <apex:outputField value="!c.Created_by_name__c}"/> section which is a formula field that pulls the user's first and last name who created the record.
<apex:page standardController="Grant__c" 
    recordSetVar="checks" 
    showHeader="false" 
    extensions="GrantCheckPrintController"
    sidebar="false" 
    standardStylesheets="false" 
    renderAs="pdf" 
    applyHtmlTag="false" 
    applyBodyTag="false">
<apex:styleSheet value="{!URLFOR($Resource.checkprinting)}" />
    <apex:repeat value="{! SelectedGrantChecks }" var="c">
    <body>
            <p style="white-space:pre; font-family:Calibri, Gadget, sans-serif;line-height: 14pt;font-size:12px;text-align:left"> 
            Personal ID: &nbsp; <apex:outputfield value="{!c.Personal_ID__c}"/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; In-House Grant:  &nbsp;<apex:outputfield value="{!c.In_House_Grant__c}"/> &nbsp; &nbsp; 
            Name: &nbsp; <apex:outputfield value="{!c.Clients_Full_Name__c}"/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Grant Type:  &nbsp;<apex:outputfield value="{!c.Type_of_Grant__c}"/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            Check Number:  &nbsp;<apex:outputField value="{!c.Check_Number__c}"/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Check Date:  &nbsp;<apex:outputfield value="{!c.Date_of_Check__c}"/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            Amount:  &nbsp;<apex:outputfield value="{!c.Amount__c}"/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Payee:   &nbsp;<apex:outputField value="{!c.Name_to_Appear_on_Check__c}"/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
           &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;
            </p> Additional Comments:&nbsp;<apex:outputField value="{!c.Additional_Comment_1__c}"/>&nbsp;<apex:outputField value="{!c.Additional_Comment_2__c}"/> &nbsp; Approved by: <apex:outputField value="!c.Created_by_name__c}"/>
         <br></br>
         <br></br>
        <p style="font-family:Calibri, Gadget, sans-serif;font-size:12px;text-align:left">Client Signature:______________________________________________&nbsp;Date:________________________</p>
         <br></br>
         <br></br>
         <br></br>
         <br></br>
         <br></br>       
       <hr size="1">
       </hr> 
        <br></br>
        <br></br>
        <br></br>
        <br></br>
 <p style="white-space:pre; font-family:Calibri, Gadget, sans-serif;line-height: 14pt;font-size:12px;text-align:left"> 
            Personal ID: &nbsp; <apex:outputfield value="{!c.Personal_ID__c}"/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; In-House Grant:  &nbsp;<apex:outputfield value="{!c.In_House_Grant__c}"/> &nbsp; &nbsp; 
            Name: &nbsp; <apex:outputfield value="{!c.Clients_Full_Name__c}"/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Grant Type:  &nbsp;<apex:outputfield value="{!c.Type_of_Grant__c}"/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            Check Number:  &nbsp;<apex:outputField value="{!c.Check_Number__c}"/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Check Date:  &nbsp;<apex:outputfield value="{!c.Date_of_Check__c}"/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            Amount:  &nbsp;<apex:outputfield value="{!c.Amount__c}"/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Payee:   &nbsp;<apex:outputField value="{!c.Name_to_Appear_on_Check__c}"/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
           &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;
           <br></br>
           </p> Additional Comments:&nbsp;<apex:outputField value="{!c.Additional_Comment_1__c}"/>&nbsp;<apex:outputField value="{!c.Additional_Comment_2__c}"/> 
         <br></br>
       <br></br>
       <br></br>
       <br></br>
        <br></br>
        <br></br>
        <br></br>
        <br></br>
        <br></br>
        <br></br>
        <br></br>
        <br></br>
        <br></br>
        <br></br>
        <p style="font-family:Calibri, Gadget, sans-serif;font-size:12px;text-align:right"><apex:outputField value="{!c.Check_Number__c}"/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <apex:outputfield value="{!c.Date_of_Check__c}"/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp;<apex:outputfield value="{!c.Amount__c}"/></p> 
        <p style="font-family:Calibri, Gadget, sans-serif;font-size:12px;text-align:left">
            <br/>
            <apex:outputfield value="{!c.Text_Amount__c}"/><br/>
            <br/>
            <apex:outputField value="{!c.Name_to_Appear_on_Check__c}"/><br/>
            <br/>
            Memo: &nbsp; <apex:outputField value="{!c.Memo__c}"/></p>
         </body> 
         <div style="page-break-after:always;"/>  
    </apex:repeat>
</apex:page>

 
Shubham_KumarShubham_Kumar
Hi Adam
I think it should be <apex:outputField value="{!c.Created_by_name__c}"/>
You missed a '{' in the expression.