Link to home
Start Free TrialLog in
Avatar of bjennings
bjennings

asked on

Crystal Reports 9 --Change a boolean on a report

Hello,

I have a boolean in a report that shows up either False or True.  What I want to do is have it be displayed as "Rework" and "Actual".

Is there anyway to do that?

Thanks,

Bill
ASKER CERTIFIED SOLUTION
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bjennings
bjennings

ASKER

I am getting closer.  The report I am using is a cross tab report and the formula will display the False value, but for some reason will not display the true value.

Do you know why it would show False, but not true?
Is it really a boolean or is it a string?

A boolean

@Myformulaname:

if {mytable.mybooleanfield} then
"Actual"
Else
"Rework"

A string
@Myformulaname:

if {mytable.mybooleanfield} = 'True' then
"Actual"
Else
"Rework"


If those don't work show the formula you are trying to use.

mlmcc
I am running a crosstab report to give me all the hours work hours in a month and to also give me the rework hours.



The right now, the totals look like this

FALSE    TRUE     TOTAL
1000      150       1150



Now, using your formula filed; it just shows "Actual",   I then went into the column Field and put the formula in the "display String".  Now it comes out like this:

Actual    Actual    Total
1000      150       1150

This is the formula I used

If {Job_Operation_Time.Rework_Time} = False
Then
'Actual'
Else If {Job_Operation_Time.Rework_Time} = True
Then
'ReWork'

I even tried  This

If {Job_Operation_Time.Rework_Time} = True
Then
'ReWork'

Then it will come out blank.


It is a boolean field.

Thanks,

Bill

bjennings,
 If {Job_Operation_Time.Rework_Time} = True
Then
"ReWork"
else
"Actual"

Pete
I tried the following:
 
If {Job_Operation_Time.Rework_Time} = True
Then
"ReWork"
else
"Actual"

Still just shows up as "Actual"...Weird, it does not want to show a true value.  If I take out all the formulas it will show both true and false
Have you tried my suggestion without the comparison and just use it as a boolean?

If {Job_Operation_Time.Rework_Time} Then
"ReWork"
else
"Actual"

mlmcc
I tried it and it did not work.  

Once the formula sees a false record it does not change after that.  I ran a filter to show only True Records and then "Rework" is displayed, but if I want to see both False and True, just "Actual" is displayed
I got it!!!!!

I was putting the formula in the wrong place!!

The place to add the formula is CrossTab expert....Columns---selected the field----Group Options----Options--"Use Formula as a group name"  I added the formula and now everything comes out perfect!!

Thanks for all your help in the formula.  I have not used Crystal since version 7, so I am a little rusty!!


Glad you got it working.

Thanks

Pete