Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to remove decimal points in a formula/count

Status
Not open for further replies.

CRadel

Technical User
Jun 3, 2011
15
US
Hi. I have a formula that was working fine to give me a count for a long time, but suddenly my count is appearing with decimal points (so "1.00" instead of "1").

I'm not the most handy with Crystal, but this is the formula:

If isnull ({RenewType}) then ({Mem_Cur_Type} & ": " & Count ({Name}, { Mem_Cur_Type})) else ({Mem_Cur_Type} & " - " & { Cur_RenewType} & ": " & Count ({Name}, { Mem_Cur_Type}))

And this is what the results should look like:
Joined: 5
Renewed/Same: 3
Renewed/Downgrade: 1

Can anyone help me fix my formula so my decimal points go away?

Thanks in advance.
Carol
 
Right click the formula, select Format Field and in Number tab, check if Style is set to -1123. If not, set it and see if it works.
 
I don't have a "number" tab when I go to "Format Field," and none of the tabs I have seem to have any info about numbering. I am probably in an ancient version of Crystal..it is version 8.5, which comes with Raiser's Edge.

Is there some other way to get to that number info?

Thanks so much!
 
Thank Betty. Where would that go in my formula?
 
Try
If isnull ({RenewType}) then ({Mem_Cur_Type} & ": " & truncate(Count ({Name}, { Mem_Cur_Type}))) else ({Mem_Cur_Type} & " - " & { Cur_RenewType} & ": " & truncate(Count ({Name}, { Mem_Cur_Type})))

 
Unfortunately this isn't changing it at all.
 
There is an option under File menu to change the number format in your reports in version 11.

File-->Options, Fields tab click Number button under Field format.
In Number tab choose -1123

I am not sure if it is the same in your version, but I believe you may have something similar.
 
It worked! Betty, thank you so much! I've been trying to figure this out on my own for a while now - I can't tell you how much I appreciate it!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top