Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: font bold on crystal report Post Reply Post New Topic
Author Message
arshesander
Newbie
Newbie


Joined: 04 Oct 2012
Location: Philippines
Online Status: Offline
Posts: 3
Quote arshesander Replybullet Topic: font bold on crystal report
    Posted: 04 Oct 2012 at 6:02pm
i use this code to set the text in a crystal report

CType(.Section2.ReportObjects("Label"), Object).text = "Your Text Here"

but my problem is how to make it bold? what code should i write?
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 08 Oct 2012 at 4:05am
Why not just format the text object as bold in the report?  Then you won't have to set it in code.
 
-Dell
IP IP Logged
arshesander
Newbie
Newbie


Joined: 04 Oct 2012
Location: Philippines
Online Status: Offline
Posts: 3
Quote arshesander Replybullet Posted: 14 Oct 2012 at 8:58pm
i have a decision to make.. if the value is something greater than 100, it should be bold. if it is less than 100.. it should be not in bold..

please help
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 15 Oct 2012 at 5:49am
You can do this in the report itself. 
1. Right-click on the object that needs to be bold and select Format...
2. Go to the Font Tab and click on the formula button to the right of "Style:"
3. Enter a formula something like this:
 
If {MyTable.Field1} > 100 then crBold else crRegular
 
This way the report will do the formatting for you.
 
-Dell
IP IP Logged
arshesander
Newbie
Newbie


Joined: 04 Oct 2012
Location: Philippines
Online Status: Offline
Posts: 3
Quote arshesander Replybullet Posted: 24 Oct 2012 at 5:02am
hello, the object that i am going to format is not
IFieldObject

but it is a ITextObject


can anyone help me please?
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.029 seconds.