Filter numbers based on formula.

Posted on 2012-09-11
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,"") & " ***"
  (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}

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?
Question by:Becky Edwards
    LVL 100

    Accepted Solution

    Does this work

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


    Author Closing Comment

    by:Becky Edwards
    Perfect!!!!! Thank you so much!!!!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
    Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now