I have an object called Claim. Each claim can have multiple transactions of various types, called Transaction, which has a TransactionType attribute.
I track all the Transactions within the Claim. So I have Claim.Transactions.
I want to produce an excel report with the various Claim attributes and a summation of the transaction amounts by TransactionType.
So for example, the excel report will have the following fields.
Claim #, Status, Description, Total Payments, Total Returns, Total Amount
So the tag I use in the excel spreadsheet is as follows
<<LIST_TABLE_START('Find Claim WHERE Claim.Program=Program')>><<Claim.ClaimNumber>>, <<Claim.Status>>,<<Claim.Description>>,<<SUM Claim.Transactions.Amount WHERE Claim.Transaction.TransactionType='Payment'>>,<<SUM Claim.Transactions.Amount WHERE Claim.Transaction.TransactionType='Return'>>,<<SUM Claim.Transactions.Amount>><<LIST_TABLE_END>>
I get an invalid tag expression. Is this because I'm going 3 levels down? (Claim.Transactions.Amount). If I can't do that, how would you advise doing it? I'm trying to avoid storing the values withing the Claim BO as my actual usage would require at least 12 different fields. I'd like to do this dynamically, is this possible?