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
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!!

Faraz AlamFaraz Alam
Hi bob_buzzard,
How do we use the above solution under <span> tag as we have put some 'if' conditions for the display of certain fields and we want those field values to be a comma-separated values. 
Thanks in advance.