Print Page | Close Window

font bold on crystal report

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=17694
Printed Date: 06 May 2024 at 1:01am


Topic: font bold on crystal report
Posted By: arshesander
Subject: font bold on crystal report
Date 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?



Replies:
Posted By: hilfy
Date 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


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: arshesander
Date 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


Posted By: hilfy
Date 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


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: arshesander
Date 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?



Print Page | Close Window