Working on a PDF report using Visualforce. Earlier questions answered here (LINK) but now I'm stuck again.
I have two child objects off of Account.
- Issue (Issue__c)
- Filing (Filing__c)
The report runs from Issue, but needs to get the related Filing records from the related account. I've tried multiple times but I can't seem to add anything in filings or filings2 to the visualforce output.
Visualforce Page
<html>
<head>
</head>
<body>
<p>Summary Page for Branch Analyst</p>
<tr>
<td>Issuer</td>
<td>{!issue__c.Issuer_Name__r.name}</td>
<td></td>
</tr>
<tr>
<td>Par Amount</td>
<td><apex:outputtext value="{0,number,$#,###,###}"><apex:param value="{!Issue__c.Par_Amount__c}"/></apex:outputtext></td>
<td></td>
</tr>
<tr>
<td>Issue Description</td><td>{!issue__c.Issue_Description__c}</td><td></td>
</tr>
<tr>
<td>Date of Bid Sale</td>
<td><apex:outputText value="{0,date,MM'/'dd'/'yyyy}"><apex:param value="{!Issue__c.Date_of_Bid_Sale__c}"/></apex:outputText></td>
<td></td>
</tr>
<tr>
<td>Is the Issue subject to 15c2-12?</td>
<td>{!issue__c.Is_the_Issue_subject_to_15c2_12__c}</td>
<td></td>
</tr>
<tr>
<td>Name</td>
<td>{!Firm.name}</td>
This is where it fails
<td>Filing Name</td>
<td>{!Filings.name}</td>
</tr>
</body>
</html>
Here's the extension:
public with sharing class FICMSummaryPDFController {
public Issue__c issue { get; private set; }
public account firm { get; private set; }
public List <Filing__c> filings { get; private set; }
public List <Filing__c> filings2 { get; private set; }
public FICMSummaryPDFController(ApexPages.StandardController controller){
issue = (Issue__c)controller.getRecord();
firm = [SELECT Name,(SELECT ID from FinancialFilings__r) from account where ID = :issue.issuer_name__c];
filings = (firm.FinancialFilings__r == null) ? new List<Filing__c>() : firm.FinancialFilings__r;
filings2 = [select id, name from filing__c where issuer__c = :issue.issuer_name__c];
}
}
}
Thanks in advance.