Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group by formula error

Status
Not open for further replies.

IceRuby

Technical User
Jan 20, 2004
85
AU
Hi there
Using Version 9 Crystal reports - MS SQL database

I want to group on a string formula but when I try to insert group the formula does not display within report fields.

Formula as follows:-
If {?Resource} like "RHWO" then "WATER OP" else
If {?Resource} like "RHWQ" then "WATER QUALITY" else
"ALL RESOURCES"

There are already two existing groups within report, both strings. I need to insert this one above these. Tried Group Expert as well but again formula does not display.

e.g. should be

GH#1 WATER QUALITY
GH#2 ORDER NO. (existing string)
GH#3 RESOURCE NO. (existing string)


Thanks in advance.
 
The formula should be placed in the detail line. Is that where it is?
 
Dear IceRuby,

This isn't something that would be a group... Is what you want to indicate is what was selected in the parameter, is that correct?

You cannot group on that formula because it doesn't relate to the fields that are being returned to the report, there is nothing to group the data on, so Crystal doesn't present the formula in the list for you. You might try creating a formula that uses whatever field is being compared to ?Resource in the selection criteria, for example Resouce ID...

Regards,

ro

Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top