+ Start a Discussion
sanju21sanju21 

how to insert commas in PDF Visualforce page

I want to have commas in quotes total price that I am displaying on my custom quote VF page(which renders as PDF), how can I have commas in the total price? Pleeeasse help!!!!!

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

You'll need to use outputtext to format your total number.

 

Assuming your field is called Quote.Total_Price__c, the following should do the trick:

 

 

<apex:outputText value="{0, number, ###,###,###,##0.00}"><apex:param value="{!Quote.Total_Price__c}"/></apex:outputText>

 

 

All Answers

bob_buzzardbob_buzzard

You'll need to use outputtext to format your total number.

 

Assuming your field is called Quote.Total_Price__c, the following should do the trick:

 

 

<apex:outputText value="{0, number, ###,###,###,##0.00}"><apex:param value="{!Quote.Total_Price__c}"/></apex:outputText>

 

 

This was selected as the best answer
sanju21sanju21

Wow actually that works!! thank sooo much Bob!!