Calculate the Column values at visual force page
Requirement: Calculate total quantity on visualforce page
Solution:
<apex:page>
<form>
<apex:variable var="countqu" value="{!0}"/>
<apex:repeat var="count" value="{!lst}" >
<td > <apex:variable var="countqu" value="{!(countqu + round(count.quantity__c,0 ))}"/> <apex:outputtext value="{!round(count.quantity__c,0 )}" /> </td>
</apex:repeat >
<td>{!countqu} </td>
</form>
</apex:page>
OUT PUT :
Quantity
10
20
30
40
----------
100 ( calculate on vf Page)
--------
Comments
Post a Comment