You need to sign in to do that
Don't have an account?
Adam 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.
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: <apex:outputfield value="{!c.Personal_ID__c}"/> In-House Grant: <apex:outputfield value="{!c.In_House_Grant__c}"/> Name: <apex:outputfield value="{!c.Clients_Full_Name__c}"/> Grant Type: <apex:outputfield value="{!c.Type_of_Grant__c}"/> Check Number: <apex:outputField value="{!c.Check_Number__c}"/> Check Date: <apex:outputfield value="{!c.Date_of_Check__c}"/> Amount: <apex:outputfield value="{!c.Amount__c}"/> Payee: <apex:outputField value="{!c.Name_to_Appear_on_Check__c}"/> </p> Additional Comments: <apex:outputField value="{!c.Additional_Comment_1__c}"/> <apex:outputField value="{!c.Additional_Comment_2__c}"/> 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:______________________________________________ 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: <apex:outputfield value="{!c.Personal_ID__c}"/> In-House Grant: <apex:outputfield value="{!c.In_House_Grant__c}"/> Name: <apex:outputfield value="{!c.Clients_Full_Name__c}"/> Grant Type: <apex:outputfield value="{!c.Type_of_Grant__c}"/> Check Number: <apex:outputField value="{!c.Check_Number__c}"/> Check Date: <apex:outputfield value="{!c.Date_of_Check__c}"/> Amount: <apex:outputfield value="{!c.Amount__c}"/> Payee: <apex:outputField value="{!c.Name_to_Appear_on_Check__c}"/> <br></br> </p> Additional Comments: <apex:outputField value="{!c.Additional_Comment_1__c}"/> <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}"/> <apex:outputfield value="{!c.Date_of_Check__c}"/> <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: <apex:outputField value="{!c.Memo__c}"/></p> </body> <div style="page-break-after:always;"/> </apex:repeat> </apex:page>
I think it should be <apex:outputField value="{!c.Created_by_name__c}"/>
You missed a '{' in the expression.