Grouping/Sorting Help in Crystal Reports

I'm trying to create a report that will show me what stage a non-conformance report is in.  There's various tabs within the program that get completed (Origination, Investigation, Disposition, and Verification) There is a check box that the user marks to complete that particular section.    I thought that the best way to be able to show me the current stage was to  group my report by what stage it is in.  So I've attempted to create a formula but I'm having issues getting the formula's syntax correct.

Is this the best/easiest way to do this?  I also suppose I need to check if isnull in my formula as well which I haven't done yet.

My formula reads:
if  totext({view_PT_NC.Originated_complete}) = 'True' and
if totext({view_PT_NC.Investigation_complete}) = 'True' and
if totext({view_PT_NC.Disposition_complete}) = 'True' and
if totext({view_PT_NC.Verification_complete}) = 'True' then


if  totext({view_PT_NC.Originated_complete}) = 'True' and
if totext({view_PT_NC.Investigation_complete}) = 'True' and
if totext({view_PT_NC.Disposition_complete}) = 'True' then


if  totext({view_PT_NC.Originated_complete}) = 'True' and
if totext({view_PT_NC.Investigation_complete}) = 'True' then


if  totext({view_PT_NC.Originated_complete}) = 'True' then

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.

You have too many 'ifs'.

It should be one "if" for each "then"
if  totext({view_PT_NC.Originated_complete}) = 'True' and
 totext({view_PT_NC.Investigation_complete}) = 'True' and
 totext({view_PT_NC.Disposition_complete}) = 'True' and
 totext({view_PT_NC.Verification_complete}) = 'True' then

if your data type for all the "...complete" fields is boolean, you can eliminate the "totext" function and just have
if  {view_PT_NC.Originated_complete} and
{view_PT_NC.Investigation_complete} and
{view_PT_NC.Disposition_complete} and
{view_PT_NC.Verification_complete} then

It's not the most elegant solution but if it works and doesn't cause performance issues, go ahead and run with it this way.

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
ITworksAuthor Commented:
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
Crystal Reports

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.