Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: How to hide a field Post Reply Post New Topic
Author Message
Central
Groupie
Groupie


Joined: 16 Feb 2011
Online Status: Offline
Posts: 56
Quote Central Replybullet Topic: How to hide a field
     Posted: 16 Feb 2011 at 4:53am
Hi,
 
I have 2 addresses (created in a formula) e.g. @address1 & @address2.
 
Depending on a field's value depends on what address is displayed.
 
Can the following be done and how is it done.
 
1. Can a formula be in a formula e.g. if field = "New York" then @address1 else @address2
 
2. How do you hide a field e.g. if @address1 exists then don't display @address2
 
Thanks in advance.
 
I am new to Crystal Reports.
 
The version is 10.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Feb 2011 at 6:29am
what are your @address1 and @ address2 formulas?
IP IP Logged
Central
Groupie
Groupie


Joined: 16 Feb 2011
Online Status: Offline
Posts: 56
Quote Central Replybullet Posted: 16 Feb 2011 at 9:38am
If I have two field with different addresses and depending on what value is in another field depends what address I display.
 
Can I hide a field on top of another field.
 
e.g.
 
If value is null then display address1 field, if not null then display address2 field.
 
I hope this explains my problem better.
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Feb 2011 at 9:42am
yes you can do this. I was trying to see your formula to make it  for you but the basic is to create a new formula field for display as:
if {table.field} = 'New York" then {@address1} else {@address2}
 


Edited by DBlank - 16 Feb 2011 at 9:42am
IP IP Logged
Central
Groupie
Groupie


Joined: 16 Feb 2011
Online Status: Offline
Posts: 56
Quote Central Replybullet Posted: 17 Feb 2011 at 3:19am
Tried it and it worked.
 
Thanks for the advice on this problem.
 
 
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