Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Conditional formatting Post Reply Post New Topic
Author Message
JagannathaSuta
Newbie
Newbie


Joined: 07 Nov 2011
Location: New Zealand
Online Status: Offline
Posts: 4
Quote JagannathaSuta Replybullet Topic: Conditional formatting
    Posted: 07 Nov 2011 at 10:46am
Hi Everyone I am using crystal 10 to develop reports.

I have a situation that I am not sure how to resolve, hence my post.

I have two date fields that are of type string, which I need to compare.
If they are the same "date" then format them as bold.

The formula I have put on {first_tx} but does not work is below.

IF {first_tx} = {last_tx} then
{first_tx} CRBold
{last_tx} CRBold

I get the error the remaining text does not appear to be part of the text.

Thanks in advance
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Nov 2011 at 10:53am
you have to do the condition on each field
IF {first_tx} = {last_tx} then CRBold else crregular
IP IP Logged
JagannathaSuta
Newbie
Newbie


Joined: 07 Nov 2011
Location: New Zealand
Online Status: Offline
Posts: 4
Quote JagannathaSuta Replybullet Posted: 07 Nov 2011 at 11:22am
Hhhhmmm ...

I tried putting this formula on {first_tx} but got the remaining text does not appear to be part of the formula.

IF {first_tx} = {last_tx} then
{first_tx} CRBold


IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Nov 2011 at 11:51am
you do not state which item is being bolded.
by inserting the conditional formula in the properties of the field it is already identified as the field to be bolded.
 
right click on first_tx
select format field
font tab
style formula (x-2)
add your conditional formula here
IF {table.first_tx} = {table.last_tx} then CRBold else crregular
 
repeat after selecting the last_tx field
 
 


Edited by DBlank - 07 Nov 2011 at 11:54am
IP IP Logged
JagannathaSuta
Newbie
Newbie


Joined: 07 Nov 2011
Location: New Zealand
Online Status: Offline
Posts: 4
Quote JagannathaSuta Replybullet Posted: 07 Nov 2011 at 12:42pm
Thank you this is now working, and thank you for your patience.
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.031 seconds.