Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Format numbers on the report level Post Reply Post New Topic
Author Message
cfrey
Groupie
Groupie


Joined: 06 Feb 2008
Location: United States
Online Status: Offline
Posts: 55
Quote cfrey Replybullet Topic: Format numbers on the report level
     Posted: 18 Feb 2010 at 12:44pm
Is there a way to set a default look for numbers in a report? I would like my negative numbers to be in parenthesis and red:

(1,256)

I can format each field with the code:

shared numbervar MTDPLBrk;
if MTDPLBrk < 0 then crRed

Is there a way to set a report wide format to do this?

Thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 18 Feb 2010 at 1:27pm
You can set the default look of numbers using the File>Options>Fields Tab and Number settings however I do not think you can set the conditional color there.
You can change your formula to
if currentfieldvalue<0 then crred else crblack
and then just Format Painter on field to field to apply that condition.
IP IP Logged
cfrey
Groupie
Groupie


Joined: 06 Feb 2008
Location: United States
Online Status: Offline
Posts: 55
Quote cfrey Replybullet Posted: 19 Feb 2010 at 5:27am
Worked great. It was a real time saver.

Thank you for your help.
IP IP Logged
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