Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Concat field but surpress fields?? Post Reply Post New Topic
Author Message
jbalbo
Senior Member
Senior Member
Avatar

Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Quote jbalbo Replybullet Topic: Concat field but surpress fields??
     Posted: 21 Feb 2013 at 5:43am
Hi

I evaluate three formulas

A,B and C

on a group footer i want to display A - B - C in a textbox
but if one is null thne I want to not have a space

so A is blank then B-C
if B is blank then A-C  etc....

Thanks
Joe

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 21 Feb 2013 at 5:58am
are A B and C coming from the last row in the group?
if so you could just add them together and then do a replace on that
 
replace({A} + ' - ' + {B} + ' - ' + {C},' -  - ',' - ')


Edited by DBlank - 21 Feb 2013 at 5:59am
IP IP Logged
jbalbo
Senior Member
Senior Member
Avatar

Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Quote jbalbo Replybullet Posted: 21 Feb 2013 at 6:27am
Thanks for the info never used replace

It almost works..
It wants to leave a a space

I changed to replace({@A} + ' '+ {@B} + ' ' + C},' ',' ')

if A is not null
I get

A

if A is null and B is not

Then I get
 B

so the list looks like

A
 B
A B
 B

etc
Thanks


IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 21 Feb 2013 at 6:30am
trim the replace
IP IP Logged
jbalbo
Senior Member
Senior Member
Avatar

Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Quote jbalbo Replybullet Posted: 21 Feb 2013 at 9:58am
Thanks works great 
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