Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Suppress Field Post Reply Post New Topic
Author Message
bjfils
Newbie
Newbie


Joined: 03 Apr 2016
Online Status: Offline
Posts: 32
Quote bjfils Replybullet Topic: Suppress Field
    Posted: 27 Jun 2017 at 4:03am
Two question regarding true/false fields. One, is there a way to replace the words True and False with a blank if false and the letter X if true? That would make it much easier to see which false items in the report still need to be completed. As a stop gap, I have True in green and False in red.

Two, my report has four fields listing pieces of equipment that might be needed for a particular job ticket. The first piece of equipment is always needed. The next three fields might be blank, depending on whether equipment pieces 2, 3, and 4 are needed. Those fields would populate in sequence, if needed, i.e. 3 can only be populated if there's something in 2, 4 can only be populated if there's something in 2 and 3. If they're not needed, the field a few columns later that shows if that is completed will always show false. Is there a way to suppress the false in those columns if the equipment ID records are blank (null)?
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 27 Jun 2017 at 4:29am
I think you would just need a formula that would look something like this:

If (somefield} = "True" then "X" else ""

You could also use the field high lighter to change the color of a field depending on a condition.

As far as what you are saying in your second paragraph.  I am assuming that you have a formula that is already working for you.
IP IP Logged
bjfils
Newbie
Newbie


Joined: 03 Apr 2016
Online Status: Offline
Posts: 32
Quote bjfils Replybullet Posted: 27 Jun 2017 at 4:41am
I don't have a formula for my second question. Currently, the report lists the Equip ID in four columns. The first column is always populated, but the next three may, or may not have anything in them, depending on whether or not the equipment is needed. There are four more columns reporting true of false to indicate if the work on each piece of equipment has been marked as finished (true). Again, the first column will eventually be changed from false to true. If that's the only piece of equipment needed, the columns for the other three will always show as false, since there's no equipment work to indicate as finished.
IP IP Logged
bjfils
Newbie
Newbie


Joined: 03 Apr 2016
Online Status: Offline
Posts: 32
Quote bjfils Replybullet Posted: 27 Jun 2017 at 7:45am
Originally posted by kevlray

I think you would just need a formula that would look something like this:If (somefield} = "True" then "X" else ""


The field in question is boolean. I've tried the above formula, but get an error that the remaining text does not appear to be part of the formula.
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 27 Jun 2017 at 10:53am
Then try this:

If (somefield} then "X" else "" or
If (somefield} = true then "X" else "" or
If (somefield} = 1  then "X" else ""
IP IP Logged
bjfils
Newbie
Newbie


Joined: 03 Apr 2016
Online Status: Offline
Posts: 32
Quote bjfils Replybullet Posted: 30 Jun 2017 at 10:37am
Still no luck. I might not be asking the right question, or I don't yet understand how the fields relate in CR. Let me try again. I have a field in the report called Equip_ID. This field can either have contain a 4 digit equipment ID number or be blank, which I guess would be null in CR terms. There's another column in the report called Equip_Done. This field is boolean and is either checked (true) or unchecked (false). It's easy to say what I'm trying to do, but I clearly don't know how to do it in CR. If Equip_ID is not null, then Equip_Done should return true or false. If Equip_ID is null, then Equip_Done should also be blank (null).

Seems simple, but I'm not having any luck. It could be that I'm not sure where I'd enter this formula, either.
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.014 seconds.