?
Solved

There must be a group that matches this field?

Posted on 2010-01-11
4
Medium Priority
?
4,964 Views
Last Modified: 2012-05-08
I am trying to add a formula field into my report but when I try to verify it I keep getting an error "There must be a group that matches this field."    The situation is that I am converting an existing report to connect into an oracle database.   The original code for the field, pulling the data from a stored procedure is as follows:  

if {USP_RPT_STOCKLINES_AGING.QTY_USED} = 0 then
    formula = Sum ({USP_RPT_STOCKLINES_AGING.QTY_OH}, {USP_RPT_STOCKLINES_AGING.PN})
elseif Sum ({USP_RPT_STOCKLINES_AGING.QTY_OH}, {USP_RPT_STOCKLINES_AGING.PN}) >= {USP_RPT_STOCKLINES_AGING.QTY_USED} then
    formula = Sum ({USP_RPT_STOCKLINES_AGING.QTY_OH}, {USP_RPT_STOCKLINES_AGING.PN}) - {USP_RPT_STOCKLINES_AGING.QTY_USED}
else
    formula = 0
end if


What I produced is below.  I was getting various other errors which were fixed by changing certain keywords and stuff like that.  But with the code below I keep getting the error I mentioned.  


if {command.QTY_USED} = 0 then
 Sum ({command.QTY_OH}, {command.PNm_auto_key})
else if Sum ({command.QTY_OH}, {command.PNm_auto_key}) >= {command.QTY_USED} then
    Sum ({command.QTY_OH}, {command.PNm_auto_key}) - {command.QTY_USED}
else
     0


Any help?  
0
Comment
Question by:patsylipp
[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
  • 2
  • 2
4 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 26289601
Does the report have a group on this field, {command.PNm_auto_key}?

mlmcc
0
 

Author Comment

by:patsylipp
ID: 26289642
No, there is one grouping and it is done on another field that is selected from within COMMAND.   The problem is that that grouping is too broad for what I am trying to do.  The pnm_auto_key links me to quantity details for one record.  The field I am grouping by has many many records that would be associated with it.

0
 
LVL 101

Accepted Solution

by:
mlmcc earned 500 total points
ID: 26289708
You are trying to summarize on a group.  So in the report there must be a group otherwise Crystal cannot do the summary.

mlmcc
0
 

Author Closing Comment

by:patsylipp
ID: 31675884
Ok, that did it!   I didnt realize that the group had to be added into the report.  Added in the group, suppressed it, hid it, and then was able to do the formula the way I wanted to.   Thanks!  
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
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 …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

752 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