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
sandersensandersen 

Problems with datatable in VF email template

 

I have two problems with the following visualforce email template:
1. Outlook doesn't handle footers in tables, so the total floats to just below the header. Is there anyway around this?
2. The outputfield in the last column of the footer doesn't render at all. If I change it to a naked reference ({!relatedTo.New_Proposal_Amount__c}) it displays but doesn't format well
Any ideas?
<messaging:emailTemplate subject="test" recipientType="Contact" relatedToType="Proposal__c"> 
<messaging:htmlEmailBody > 
              <div>  
                 <apex:datatable width="600" border="1" var="pli" value="{!relatedTo.Proposal_Lines__r}"> 
                    <apex:column > 
                        <apex:facet name="header" ><strong>Product</strong></apex:facet> 
                        
                        <apex:facet name="footer"><strong>Total</strong></apex:facet> 
                        <apex:outputfield value="{!pli.Product_Name__c}"/> 
                     </apex:column> 
                    <apex:column >
                        <apex:facet name="header"><strong>Quantity</strong></apex:facet> 
                        
                        <apex:facet name="footer"></apex:facet> 
                        <apex:outputfield value="{!pli.Quantity__c}"/>
                    </apex:column> 
                    <apex:column > 
                        <apex:facet name="header"><strong>Amount</strong></apex:facet> 
                        
                        <apex:facet name="footer"><strong><apex:outputField value="{!relatedTo.New_Proposal_Amount__c}"</strong></apex:facet>
                        <apex:outputField value="{!pli.Proposal_Line_Total_Price__c}"/>
                    </apex:column> 
                </apex:datatable> 
</div>
</messaging:htmlEmailBody> 
</messaging:emailTemplate>