If you aren't using a custom VF page and/or components won't work for you, then you may want to consider making a formula field and using it to display your image in a standard Visual Force page.
I would recommend that you create a component that you pass the boolean (true/false) variable into and have that component the reference a static image of a check mark when true and a static image of an x when false. You can of course use any images you want.
I get this idea from the fact that you can't render input items (like check boxes) in PDF on salesforce. Here is a thread that talks about this.
First off, you will need to create 2 static resources to hold your images. For this example, the true/check mark should be anemd "CheckMark" and the false / red x should be named "XMark". You can get good / free images from here if you need to.
Once you have done that you can create this component and name it "boolean2Checkbox":
<apex:component >
<apex:attribute required="true" type="boolean" name="booleanValue" description="This is the true/false var to be displayed" />
<apex:image id="TrueImage" value="{!$Resource.CheckMark}" width="50" height="50" rendered="{!booleanValue}" />
<apex:image id="FalseImage" value="{!$Resource.XMark}" width="50" height="50" rendered="{!NOT(booleanValue)}" />
</apex:component>
PLEASE NOTE: You may need to adjust your height / width to match your image.
And here is a sample controller that sets the var for use on the page by the component:
public with sharing class Test2Controller {
public boolean MyBooleanVar {get; set;}
public Test2Controller() {
MyBooleanVar = true;
} // end constructor
} // end class
If you aren't using a custom VF page and/or components won't work for you, then you may want to consider making a formula field and using it to display your image in a standard Visual Force page.
If you aren't using a custom VF page and/or components won't work for you, then you may want to consider making a formula field and using it to display your image in a standard Visual Force page.
Here is one link and here is another about this
All Answers
I would recommend that you create a component that you pass the boolean (true/false) variable into and have that component the reference a static image of a check mark when true and a static image of an x when false. You can of course use any images you want.
I get this idea from the fact that you can't render input items (like check boxes) in PDF on salesforce. Here is a thread that talks about this.
Thanks so much!
Do you have any idea how to do this? I am fairly new to this all.
First off, you will need to create 2 static resources to hold your images. For this example, the true/check mark should be anemd "CheckMark" and the false / red x should be named "XMark". You can get good / free images from here if you need to.
Once you have done that you can create this component and name it "boolean2Checkbox":
PLEASE NOTE: You may need to adjust your height / width to match your image.
Here is a sample page using just the component:
And here is a sample controller that sets the var for use on the page by the component:
If you aren't using a custom VF page and/or components won't work for you, then you may want to consider making a formula field and using it to display your image in a standard Visual Force page.
Here is one link and here is another about this