function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
suji srinivasansuji srinivasan 

How to round off fields values in visualforce page?


<apex:page standardController="account" extensions="SalaryRewards" showheader="false" sidebar="false">
    <apex:pagemessages ></apex:pagemessages>  
    <apex:pageblock >
        <apex:pageBlocktable value="{!lsalaryInfo}" var="sinfo">
            <apex:column value="{!sinfo.month}" headervalue="Month"/>
            <apex:column value="{!Round(sinfo.Basic_Allowance,0)}" headervalue="BasicAllowance"/>                              
      <apex:page standardController="account" extensions="SalaryRewards" showheader="false" sidebar="false">
    <apex:pagemessages ></apex:pagemessages>  
    <apex:pageblock >
        <apex:pageBlocktable value="{!lsalaryInfo}" var="sinfo">
            <apex:column value="{!sinfo.month}" headervalue="Month"/>
            <apex:column value="{!Round(sinfo.Basic_Allowance,0)}" headervalue="BasicAllowance"/>                              
               </apex:pageBlocktable>
    </apex:pageblock>
</apex:page>

I am getting error as : Syntax error. Missing ')'
can anyone guide me what i am missing ?

Thanks in Advance
 
Best Answer chosen by suji srinivasan
Virendra ChouhanVirendra Chouhan

I think there is some issue on column's value.

You can try to use outputText inside the columns. something like:

<apex:column headervalue="BasicAllowance">
     <apex:outputText value="{!Round(sinfo.Basic_Allowance,0)}"/>
 </apex:column>

All Answers

Virendra ChouhanVirendra Chouhan

I think there is some issue on column's value.

You can try to use outputText inside the columns. something like:

<apex:column headervalue="BasicAllowance">
     <apex:outputText value="{!Round(sinfo.Basic_Allowance,0)}"/>
 </apex:column>
This was selected as the best answer
suji srinivasansuji srinivasan
Thank you virendra