Report Design
 Crystal Reports Forum : Crystal Reports .NET 2003 : Report Design
Message Icon Topic: Selective Font Color Formatting Post Reply Post New Topic
Author Message
pinakeep
Newbie
Newbie


Joined: 19 Aug 2010
Location: India
Online Status: Offline
Posts: 2
Quote pinakeep Replybullet Topic: Selective Font Color Formatting
    Posted: 19 Aug 2010 at 1:37am
Hi,
 
Following lines get printed in a report in the mentioned format. I want to change the font color of the "^" symbol to something different. how do i do it through formula? the number of lines and ^ symbols gets generated dynamically so it can be multiple lines for different cases. 
 
Line1
^
Line2
^
Line3
^
Line4
 
thanks
Pinakee
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 19 Aug 2010 at 3:25am
you can change the value of cell, but not of character in a cell.
for a cell, right click the cell, select format the cell or properties, go to the font tab select the x-1 by the color. From there regular CR formula writing takes over and the valid options are listed for you.
 
HTH
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 25 Aug 2010 at 9:23am
I believe you add an if then statement for the color formula that lockwelle mentioned, and you can use it to color specific characters is have the the ascii code for it.
 
If would go something like this...
 
If Char(32) then crRed else crblack;
 
I have used this quite a bit to set the color of checkmarks and other special characters in the WingDings fonts. If you have Brian's book you will find it discussed there as well.
 
I always get the syntax wrong  on the ascii character code but feel free to look in the help file. Just know that this is the color the character will be, so if you want an 'a' to be red in that text object or field all 'a's will red. You would need alot more logic to control what is happening if that is what you want.
 
Hope this helps.
 
Regards,
John W.
 
IP IP Logged
pacuccaro
Newbie
Newbie
Avatar

Joined: 16 Sep 2011
Location: United States
Online Status: Offline
Posts: 17
Quote pacuccaro Replybullet Posted: 16 Sep 2011 at 6:26am
I think I understand your comments and have tried it and can get it to work for my issue however when I export the crystal report to excel I lose the font - is there a way to keep the special font in excel
thanks
pacuccaro
 
IP IP Logged
CircleD
Senior Member
Senior Member
Avatar

Joined: 11 Mar 2011
Location: United States
Online Status: Offline
Posts: 251
Quote CircleD Replybullet Posted: 16 Sep 2011 at 10:55am
Only if the font is in the Excel folder as well.
IP IP Logged
pacuccaro
Newbie
Newbie
Avatar

Joined: 16 Sep 2011
Location: United States
Online Status: Offline
Posts: 17
Quote pacuccaro Replybullet Posted: 19 Sep 2011 at 2:50am
thanks but what I found was that if you export by using page it works but record format you lose the font - i just have to fix everything so i can use page instead of record when i export - thanks again for your help
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.000 seconds.