You need to sign in to do that
Don't have an account?
Sid Lightning
Hide entire column and row on pdf if the value in row is 0
Hi,
I want to hide a field in visualforce page pdf , if there is no value or '0' in it.
However, heading for the field is given in an HTML Tag ? I want that also to be hidden.
This is how code is written.
<th class="centerCell">SMD</th>
<apex:repeat value="{!Opportunity.OpportunityLineItems}" var="l">
<tr>
<td class="attCell centerCell">{!l.Discount__c}</td>
</tr>
</apex:repeat>
Please note that thier are other fields also in the same row. But I want just the value to get hidden for this field
I want to hide a field in visualforce page pdf , if there is no value or '0' in it.
However, heading for the field is given in an HTML Tag ? I want that also to be hidden.
This is how code is written.
<th class="centerCell">SMD</th>
<apex:repeat value="{!Opportunity.OpportunityLineItems}" var="l">
<tr>
<td class="attCell centerCell">{!l.Discount__c}</td>
</tr>
</apex:repeat>
Please note that thier are other fields also in the same row. But I want just the value to get hidden for this field
This is how i understood your question , you want to hide a SMD header in table if all the values discount is 0 .
If this is what you want,
Then this will be bit complex , you need to restructure your apex class and get total in the apex
I have made small example for you .
You can refactor this code and use opportunitylineItem in repace of discountList.
Hope this helps.