?
Solved

Filter numbers based on formula.

Posted on 2012-09-11
2
Medium Priority
?
429 Views
Last Modified: 2012-09-12
I need to select only certain codes.  The codes are indicated in a formula that takes into account more than one field.

I only want codes that go from 3001 to 3999.  Attached is the report, and below are the two formulas.  

The first formula takes into account null values and formats the ID and name of the field.
if {CLARITY_TDL_TRAN.DETAIL_TYPE} in [21,23] then
  (if isnull({CLARITY_TDL_TRAN.MATCH_PROC_ID}) then "*** NO PROCEDURE ***"
    else if isnull({MATCH_PROCEDURE.PROC_ID}) then "*** UNKNOWN PROCEDURE ***"
    else if isnull({MATCH_PROCEDURE.PROC_CODE}) then "*** No Code for internal procedure # " & ToText({MATCH_PROCEDURE.PROC_ID},0,"") & " ***"
    else if isnull({MATCH_PROCEDURE.PROC_NAME}) then {MATCH_PROCEDURE.PROC_CODE}
    else ToText({MATCH_PROCEDURE.PROC_CODE}) & " - " & {MATCH_PROCEDURE.PROC_NAME}
  )
else
  (if isnull({CLARITY_TDL_TRAN.PROC_ID}) then "*** NO PROCEDURE ***"
    else if isnull({PROCEDURE.PROC_ID}) then "*** UNKNOWN PROCEDURE ***"
    else if isnull({PROCEDURE.PROC_CODE}) then "*** No Code for internal procedure # " & ToText({PROCEDURE.PROC_ID},0,"") & " ***"
    else if isnull({PROCEDURE.PROC_NAME}) then {PROCEDURE.PROC_CODE}
    else ToText({PROCEDURE.PROC_CODE}) & " - " & {PROCEDURE.PROC_NAME}
  )

The second formula is used in the record select to indicate which procedures should be included in the report.

{CLARITY_TDL_TRAN.POST_DATE} in {@Interpreted Start Date} to {@Interpreted End Date} and
((not(isnull({CLARITY_TDL_TRAN.SERV_AREA_ID})) and {CLARITY_TDL_TRAN.SERV_AREA_ID} = {?Service Area ID}) or {?Service Area ID} = 0) and
(((not(isnull({DEPARTMENT.REV_LOC_ID}) ) and (totext({DEPARTMENT.REV_LOC_ID}, 0, "") in {?Location}) or {?Location}= "0"))) and
({@Procedure Code} startswith "300")

Unfortunately, this formula includes procedure code 3000, which I need filtered OUT of the report.  

Can someone tell me how to build the record select formula so that only 3001 to 3999 are in the report?
ExpExchSample.rpt
0
Comment
Question by:Becky Edwards
2 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 1080 total points
ID: 38388818
Does this work

({@Procedure Code} IN "3001" to "3999")

mlmcc
0
 

Author Closing Comment

by:Becky Edwards
ID: 38392745
Perfect!!!!! Thank you so much!!!!
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

809 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