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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sort Custom group names 1

Status
Not open for further replies.

BigC72

MIS
Oct 15, 2004
69
US
I am working with CR 8.5 and hooking a DB2 database. I have created custom group names that encompass various medical procedure codes. The formula to create the groups works great but I'd like to be able to sort these custom groups alphabetically. Would I do it within the same formula or in another manner? Thanks...
 
Try posting your formula.

Grouped fields are sorted in Crystal, so the question is unclear.

-k
 
Sorry,

Here is a small sample:

if {TRANSACTIONS.PROCEDURE_CODE} in "71010,71020,71030,71021,71035,71100" then "Chest Xray" else

if {TRANSACTIONS.PROCEDURE_CODE} in "74000,74020,74022" then "Abdomen Xray" else

if {TRANSACTIONS.PROCEDURE_CODE} in "76090,76091,76092,76499" then "Mammography"

The custom names are created on a group created by the Procedure Code field. I also have the report grouped by service date. In the sort wizard both groups are displayed but neither can be highlighted and a sort option chosen. I assumed it had to do with the fact that custom group names had been created.
 
The custom names shouldn't be created on a group created by the procedure code, use the formula as the group.

Make sure that you group has a catchall at the end as well, such as:

if {TRANSACTIONS.PROCEDURE_CODE} in "71010,71020,71030,71021,71035,71100" then "Chest Xray" else
if {TRANSACTIONS.PROCEDURE_CODE} in "74000,74020,74022" then "Abdomen Xray" else
if {TRANSACTIONS.PROCEDURE_CODE} in "76090,76091,76092,76499" then "Mammography"
else
"N/A"

The catchall else "N/A" assures that every row is accounted for, so that the formula can be used as a group.

-k
 
Thanks K, that was the ticket. Appreciate the help...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top