• Molly Bollig
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Hi All,

 

I have (with a great deal of help from this forum) managed to put together a VF Page which renders a custom object record as a PDF - excellent start.

 

All the PDF displays, is a pretty basic form of all the fields from the record - so we can then email the PDF to people.

 

Some of these custom object fields, however, are Checkboxes, and on my PDFs the values for said Checkboxes display as "true" or "false" depending on what was input - which I completely agree makes sense.

 

However, the people I am making this PDF form for do not think all lower-case "true" or "false" look very pretty - so have requested that I amend this to read "Yes" for true and "No" for false.

 

At the moment, the only way I can think of doing this is to create a custom object formula field for each Checkbox I have, which is an IF statement to display either "Yes" or "No" - but with a LOT of checkboxes on the form this would be incredibly time consuming - and I would have thought there must be some form of VisualForce jiggery-pokery which could change the appearance of checkbox values on the VF Page - can anyone help?

 

Quick snippet of the code for the page as follows:

 

<apex:page renderAs="pdf" StandardController="Adverse_Incident__c" showHeader="false">

<html>

<head>
<style>
@page{
margin:0.25in;
}
.Label{
font-weight:bold;
font-size:10px;
font-family:"arial" "sans-serif";
}
.Output{
font-weight:regular;
font-size:10px;
font-family:Arial Unicode MS;
}
.colStyle{
width:25%;
}
</style>
</head>

<apex:outputText style="font-style:bold; font-weight:bold; font-size:14px; font-family:sans-serif" value="Incident Information"/>

   <apex:PanelGrid columnClasses="colStyle" columns="4" border="1" frame="box" rules="all" width="100%" cellpadding="1px">
<apex:outputlabel styleClass="Label" value="Person Reporting Incident"/>
<apex:outputText styleClass="Output" value="{!Adverse_Incident__c.Person_Reporting_Incident__c}"/>
<apex:outputlabel styleClass="Label" value="Incident ID"/>
<apex:outputText styleClass="Output" value="{!Adverse_Incident__c.Name}"/>
   </apex:PanelGrid>

<apex:outputText style="font-style:bold; font-weight:bold; font-size:2px; font-family:sans-serif; color:white" value="."/> <p></p>
<apex:outputText style="font-style:bold; font-weight:bold; font-size:14px; font-family:sans-serif" value="Facility Information"/> 
   
   <apex:PanelGrid columnClasses="colStyle" columns="4" border="1" frame="box" width="100%" cellpadding="1px">
<apex:outputlabel styleClass="Label" value="Hospital Name"/>
<apex:outputText styleClass="Output" value="{!Adverse_Incident__c.Hospital_Name__c}"/>
<apex:outputlabel styleClass="Label" value="Street Address"/>
<apex:outputText styleClass="Output" value="{!Adverse_Incident__c.Street_Address__c}"/>
<apex:outputlabel styleClass="Label" value="Account Number"/>

 

Any help would be greatly appreciated.  Many thanks,

 

Andy