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!

Crystal 8.5 - Formula - 2 ranges pulling from the same table 1

Status
Not open for further replies.

kabtjb

Technical User
Dec 2, 2003
8
US
Everything in this formula works except the last two statments in the fromula. It is the part that involves the vst_v.dx_cd table. I am trying to enter two different ranges using the same table. When I enter the first range and run it then the first range works, but when I add and run the second range the result returns zero cases as if it couldn't understand either range. Any suggestions?




{vst_v.age} in 18 to 127 and
{vst_v.end_full_date} in DateTime (2003, 12, 01, 00, 00, 00) to DateTime (2003, 12, 31, 23, 59, 59) and
{vst_v.vst_type_cd} = "I" and
{vst_v.acct_sts} <> "I" and
not ({vst_v.hosp_svc} like "M*") and
not ({vst_v.adm_src} in ["TA", "TB", "TE", "TH", "TS"]) and
{vst_v.dx_cd} in "480.0" to "483.8" and
{vst_v.dx_cd} in "485" to "487.8
 
You need to change that last "range" a bit, something more like:

{vst_v.dx_cd} in ["480.0" to "483.8", "485" to "487.8"]

-dave
 
That should work or you could go from:
not ({vst_v.adm_src} in ["TA", "TB", "TE", "TH", "TS"]) and
{vst_v.dx_cd} in "480.0" to "483.8" and
{vst_v.dx_cd} in "485" to "487.8"

to
not ({vst_v.adm_src} in ["TA", "TB", "TE", "TH", "TS"]) and
({vst_v.dx_cd} in "480.0" to "483.8" or
{vst_v.dx_cd} in "485" to "487.8")

(Note the parenthesis.)

This works better if the new condition is slightly or more than slightly different.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top