Create group from formula field in a command

I am using a command in Crystal Reports XI, and I am having an issue creating a group based off of a formula field.  When I go to create the group, it will not let me select any of the formula fields, just the command fields.
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.

I suspect you have WhilePrintingRecords or Shared variables in the formulas.

Crystal uses a multiple pass method to render the reports and the groups are done in one of the early passes through the report while formulas as noted above are done in the final pass through the report.   Thus the values from those formulas are not available for grouping.

What are you trying to accomplish with the groups and the formulas?
Does the report have subreports?

TomBallaAuthor Commented:
Well, normally I don't use commands so I don't know how they differ from what I normally do.  

On a report I have written I use a formula called Supervisor that lists the supervisor name and the route numbers attached to that supervisor and I group by that formula with no problem.  No subreports used.
There is no real difference in grouping when you use a command or tables.

Can you show the formula you are trying to use?

Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

TomBallaAuthor Commented:
Do I need to change the SorDetail.MWarehouse to just MWarehouse since I am using a command?

IF{SorDetail.MWarehouse} = "04" OR
{SorDetail.MWarehouse} = "12" OR
{SorDetail.MWarehouse} = "24" OR  {SorDetail.MWarehouse} = "25" OR
{SorDetail.MWarehouse} = "90" THEN

IF  {SorDetail.MWarehouse} = "05"
OR {SorDetail.MWarehouse} = "06" OR {SorDetail.MWarehouse} = "08" OR {SorDetail.MWarehouse} = "02" OR
{SorDetail.MWarehouse} = "21" THEN

IF {SorDetail.MWarehouse} = "39" OR {SorDetail.MWarehouse} = "40"
OR {SorDetail.MWarehouse} = "42"  THEN

IF {SorDetail.MWarehouse} = "41"  THEN
ELSE " "
I don't think so.  Check the Field Explorer for the Database Fields, What is the top level name?  If it is SorDetail then it should be ok.

Have you done a VERIFY DATABASE?

TomBallaAuthor Commented:
The top level name is command.  I did the verify database and it said database is up to date.
You will need to edit the formula and replace the fields from the field list


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
TomBallaAuthor Commented:
That did it.  Thanks.
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.