Round a decimal value to the nearest quarter in Crystal Reports XI

I have a decimal value that I am pulling into a Crystal Report.  That value is then divided by 2.  After that I need to round it up to the nearest quarter.

The value of the field is 2.75
I divide that by 2 to get 1.37
I now need to round it up to 1.5 to be at the next quarter amount.

Any help will be greatly appreciated!!!!!!
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

This formula should work for you.. Replace 2.769 with your column...

numbervar test:= round(2.769,2);
stringvar whole:= left(totext(test),instr(totext(test),".")-1);
numbervar half:= cdbl(right(totext(test),instr(totext(test),".")));
stringvar newwhole;

if half in [1 to 25]
    then newwhole:=whole+'.25'
    if half in [26 to 50]
        then newwhole:= whole&'.50'
        if half in [51 to 75]
        then newwhole:= whole&'.75'
            if half in [76 to 99]
                then newwhole:= totext(cdbl(whole)+1);


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
You could modify this formula

PEAKTTAuthor Commented:
Thank you so much!!!  Never thought to go from number to string to number.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.