Solved

Create group from formula field in a command

Posted on 2014-09-26
8
318 Views
Last Modified: 2014-09-26
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.
0
Comment
Question by:TomBalla
  • 4
  • 4
8 Comments
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
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?

mlmcc
0
 

Author Comment

by:TomBalla
Comment Utility
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.
0
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
There is no real difference in grouping when you use a command or tables.

Can you show the formula you are trying to use?

mlmcc
0
 

Author Comment

by:TomBalla
Comment Utility
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
"John"
ELSE

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

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

IF {SorDetail.MWarehouse} = "41"  THEN
"Walma"
ELSE " "
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
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?

mlmcc
0
 

Author Comment

by:TomBalla
Comment Utility
The top level name is command.  I did the verify database and it said database is up to date.
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
Comment Utility
You will need to edit the formula and replace the fields from the field list

mlmcc
0
 

Author Comment

by:TomBalla
Comment Utility
That did it.  Thanks.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now