• dl-1
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies

I'm trying to do a very simple repleat on an object.  I've looked at several examples and so far I've been unable to figure it out.

 

To help me learn this platform I'm creating a very simple expense report.  The report is Expense_Report__c and it can contain the objects Expense_Item_c.  This is working great.

 

Now I'm trying to figure out how to generate a PDF that will show me the name of the expense report and list the expense items related to that expense report.

 

I've looked a several examples but can't quite figure out what seems like is pretty straight forward.

 

Here's my code:

 

<apex:page standardController="Expense_Report__c" showHeader="false" renderAs="pdf">
  <!-- Begin Default Content REMOVE THIS -->
  <h1>XX 2:<apex:outputText value="{!Expense_Report__c.Name}" /></h1>
 
  <apex:repeat var="item" value="{!Expense_Report__c.Expense_Item__r">
  <tr><td>item.name</td></tr>
  </apex:repeat>
    <!-- End Default Content REMOVE THIS -->
</apex:page>

  • January 13, 2010
  • Like
  • 0