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
Urvik TrivediUrvik Trivedi 

Visualforce Page PDF (Field Value Not Displayed Properly)

I have a visualforce page that I am rendering as PDF. I have a formula (currency) that displays like 1.02E+7 instead of the correct amount. I am using HTML {!Opportunity.Profit__c}. If I use <apex:outputField Value .....> , it displays correct but than it messes up my alignment. Any advice?
Best Answer chosen by Urvik Trivedi
Swayam@SalesforceGuySwayam@SalesforceGuy
Hi,
You have to format the field for display, using apex:param
<apex:outputText value="${0, number, ###,###,###,###}"> 
<apex:param value="{!Opportunity.Profit__c}"/> 
​</apex:outputText>
Hope, this helps,

--
Thanks,
Swayam
@salesforceguy
 

All Answers

Swayam@SalesforceGuySwayam@SalesforceGuy
Hi,
You have to format the field for display, using apex:param
<apex:outputText value="${0, number, ###,###,###,###}"> 
<apex:param value="{!Opportunity.Profit__c}"/> 
​</apex:outputText>
Hope, this helps,

--
Thanks,
Swayam
@salesforceguy
 
This was selected as the best answer
Urvik TrivediUrvik Trivedi
Thanks Swayam!