Crystal Reports - Change Group to Group by Formula


I had a report that was grouping on a task code (ex.- LABOR, REVENUE, FRINGE, etc.). I modified that field (but only in the details) so that if the task code was LABOR, it would read another field and append nothing, " - OT" or " - PREM" depending on that field's value. That worked like a champ.

Now I need to group by the formula so that it will total for all 3 of those possibilities, as well as the others that I did not mess with.

When I change the group to group by the formula, I get an error: Group footer not available for total break. Total break request ignored.

The group footer is no longer showing, so I had to revert back.

Can anyone point out what I should do to do this correctly?
street9009IT Project ManagerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

Try adding a second group.

Group by the main field (no name change)
Group by a formula that changes the name for that group only and leaves the other the same
  You can suppress the group header and footer for the second group when you don't need it

If mlmcc's suggestion doesn't work, what version of CR are you using?  The error, and removal of a group footer, sound odd to me, but maybe you're just using a newer (or older) version that I'm not familiar with.

street9009IT Project ManagerAuthor Commented:
mlmcc - Can you outline how that's done a little bit? I'm still relatively new to Crystal.

James- It's Crystal 2008.
You have the first group just eliminate the use of the formula in it.

Create your formula
If {TaskCode Field} <:> 'Labor then
    {TaskCode Field}
Else if {Other FIeld} = "X" then
    {TaskCode Field} & "-OT"
Else if {Other FIeld} = "Y" then
    {TaskCode Field} & "-Prem"
    {TaskCode Field}

Open in new window

Add a second group to the report
Choose the formula field

You can suppress the group2 header/footer with
Right click the group header in the left margin
Make sure GH2 is highlighted
Click the formula button to the right of SUPPRESS
{TaskCode Field} = "Labor"

Similarly for the G2 Footer

You can right click the fields in the report for summaries
Right click a field
Set it as a sum
Set it to go to ALL GROUP FOOTERs


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
street9009IT Project ManagerAuthor Commented:
Worked like a champ!
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.