首页 > 解决方案 > 如何在不使用汇总汇总的情况下计算 PDF 报告模板中的总计

问题描述

我正在尝试在我的 pdf 报告中显示小计和总计。由于系统限制,我无法使用汇总摘要。我刚刚开始学习如何获得编码所需的结果,但我不确定如何继续进行计算。这是我所拥有的一个片段:

 {{#filter FX5__Ticket_Items__r "RecordType.DeveloperName" is="SS_Environmental"}}
 <tbody>
 {{#each items}}
 <tr> 
 <td class="rpt-text Halign-lt">{{FX5__Description__c}}</td>
 <td class="rpt-text Halign-lt">{{UOM__c}}</td> 
 <td class="rpt-text Halign-ctr">{{FX5__Input_Qty__c}}</td>
 <td class="rpt-number Halign-rt">{{formatCurrency FX5__Price__c symbol="$" precision="2" 
 separator="," decimal="."}}</td>
 <td class="rpt-number Halign-rt">{{formatCurrency HRI_Tot_Dollars_Sub_2__c symbol="$" 
 precision="2" separator="," decimal="."}}</td>     
 </tr> 
 {{/each}}
 </tbody>
                               
 </table>

 <table cellpadding="0" cellspacing="0" style="padding:0">
 <tr>
 <th width="90%" class="Halign-rt">Environmental Total:</th>
 <td width="30%" class="rpt-data Halign-rt">{{sum items "HRI_Tot_Dollars_Sub_2__c"}}</td>
 </tr>  
 </table>                    
 {{/filter}}
 <table cellpadding="0" cellspacing="0" style="padding:0">
 <tr>
 <th width="90%" class="Halign-rt">SubTotal:</th>
 <td width="30%" class="rpt-data">{{sum items "HRI_Equip_Amt__c" "HRI_Personnel_Amt__c" 
 "HRI_Tot_Dollars_Sub__c" "HRI-Tot_Dollars_Sub_2__c"}}</td>
 </tr>  
 </table>

标签: calculationsubtotal

解决方案


推荐阅读