Home
Crystal Reports Training
Crystal Reports XI
Crystal Reports .NET
Crystal Reports Forum
News
Tech Support
Active Topics
Memberlist
Search
Help
Register
Login
Technical Questions
Crystal Reports Forum
:
Crystal Reports 9 through 2022
:
Technical Questions
Topic: Formula for grouping
Oldest Post First
Newest Post First
Author
Message
sanchezgmc06
Senior Member
Joined: 21 Jan 2011
Online Status: Offline
Posts: 107
Topic: Formula for grouping
Posted: 06 Apr 2017 at 1:56pm
Hello I need to write a formula to group diagnosis codes
The diagnosis codes can be 3-5 characters
Example: F21.1 OR F41.25
I want to do this formula in my command statement but not sure how to start it
For instance I need to categorize the diagnosis in the following order:
If they start with F70 - F90 THEN label this range as Mental Retardation
Hope I am explaining myself well
IP Logged
Sastry
Moderator
Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Posted: 07 Apr 2017 at 4:03am
Hi,
You need to use Case statement to group the diagnosis codes like ..
Select (case when left(diagnosis,3) ='F70' OR left(diagnosis,3) ='F90' then 'Mental Retardation' else when left(diagnosis,3) ='F21' THEN 'XXX' SO ON..
Please check case statement syntax in google for your database and write it.
Thanks,
Sastry
Thanks,
Sastry
IP Logged
sanchezgmc06
Senior Member
Joined: 21 Jan 2011
Online Status: Offline
Posts: 107
Posted: 07 Apr 2017 at 6:20am
Perfect! thank you
IP Logged
Printable version
Forum Jump
-- Select Forum --
Announcements
Talk with the Author
Self-Publishing
Job Postings
New feature request
Report Design
Data Connectivity
Technical Questions
Tips and Tricks
Crystal Xcelsius
Report Design
Data Connectivity
Writing Code
Tips and Tricks
Report Design
Data Connectivity
Writing Code
Tips and Tricks
You
cannot
post new topics in this forum
You
cannot
reply to topics in this forum
You
cannot
delete your posts in this forum
You
cannot
edit your posts in this forum
You
cannot
create polls in this forum
You
cannot
vote in polls in this forum
This page was generated in 0.020 seconds.
HOME
|
FREE EBOOK
|
PROGRAMMING GUIDE
|
PURCHASE
|
REVIEWS
|
CONTACT ME
|
FAQ
|
LINKS
|
CLICK PLAYS
|
COACH FORUMS
|
TROPICAL FISH
© 2004-2024 Brian Bischof. All Rights Reserved.