+ Start a Discussion
Administrator 88Administrator 88 

Render PDF displaying Blank Formula field

Problem is in the one of the formula field.

Its automatically calculating values and displaying "INR 0.00".

But i dont want to display this formula field, if the output is INR 0.00.

But its recognizing this value and rendering in it pdf, how to avoid this issue.
 
  <tr style="display: {!IF(ISBLANK(Quotation__c.Sub_Total2__c), 'none', 'table-row')};">
  <td align="right" colspan="8"><b>Sub Total ({!Quotation__c.CurrencyIsoCode}) : </b></td>
  <td align="right" >{!Quotation__c.Sub_Total2__c} </td>
  </tr>
  
  <tr style="display: {!IF(ISBLANK(Quotation__c.Discount2__c), 'none', 'table-row')};">
  <td align="right" colspan="8"><b>Discount ({!Quotation__c.CurrencyIsoCode}) : </b></td>
  <td align="right" >{!Quotation__c.Discount2__c} </td>
  </tr>
  
  <tr style="display: {!IF(ISBLANK(Quotation__c.Total2__c), 'none', 'table-row')};">
  <td align="right" colspan="8"><b>Total ({!Quotation__c.CurrencyIsoCode}) : </b></td>
  <td align="right" >{!Quotation__c.Total2__c} </td>
  </tr>

Formula fields are "Total2__c, Discount2__c, Sub_Total2__c"
Best Answer chosen by Administrator 88
Bhanu MaheshBhanu Mahesh
Hi,

Try
<tr style="display: {!IF(Quotation__c.Sub_Total2__c == 0, 'none', 'table-row')};">
<td align="right" colspan="8"><b>Sub Total ({!Quotation__c.CurrencyIsoCode}) : </b></td>
<td align="right" >{!Quotation__c.Sub_Total2__c} </td>
</tr>

<tr style="display: {!IF(Quotation__c.Discount2__c == 0, 'none', 'table-row')};">
<td align="right" colspan="8"><b>Discount ({!Quotation__c.CurrencyIsoCode}) : </b></td>
<td align="right" >{!Quotation__c.Discount2__c} </td>
</tr>

<tr style="display: {!IF(Quotation__c.Total2__c == 0, 'none', 'table-row')};">
<td align="right" colspan="8"><b>Total ({!Quotation__c.CurrencyIsoCode}) : </b></td>
<td align="right" >{!Quotation__c.Total2__c} </td>
</tr>

Regards,
Bhanu Mahesh