Solved

Create group from formula field in a command

Posted on 2014-09-26
8
329 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 40346264
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
ID: 40346348
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
ID: 40346475
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
[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

 

Author Comment

by:TomBalla
ID: 40346496
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
 
LVL 100

Expert Comment

by:mlmcc
ID: 40346536
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
ID: 40346580
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
ID: 40346690
You will need to edit the formula and replace the fields from the field list

mlmcc
0
 

Author Comment

by:TomBalla
ID: 40346734
That did it.  Thanks.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Cyrstal Reports formula to check IsNull 8 46
Sum not calculating correctly 22 59
division by zero in crystal reports 1 35
Convert Mountain Time to GMT 5 32
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Suggested Courses

738 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