Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2009

    Unanswered: Re: Formulae update


    I am working with 2005 and use crystal report on my application.
    I have a Crystal Report formulae which works fine. However, I want to add more functionality. Presently the Discrete values on the Enter Parameter Dialogue box are;


    What I want to do is when I select "Dr" the formulae pulls all the Dr & Dr(Mrs) at one time.....

    Please could anyone tell me how I can achieve that.. Presently I have the following formulae which has no error but doesnt give the result

    (if {?By Salutation} = "ALL" then TRUE
    else {GP27.SALUTATION} = {?By Salutation}) or
    (if {?By Salutation} = "Dr" then
    {GP27.SALUTATION} = "Dr" and
    {GP27.SALUTATION} = "Dr(Mrs)")

    Last edited by dr223; 07-22-09 at 08:19.

  2. #2
    Join Date
    Dec 2004
    First of all - you just confused OR with AND ("OR" means it meets any of the conditions, "AND" means it must meet all of the conditions). Since a person can't be listed as "Dr" and "Dr(Mrs)" at the same time, setting the parameter to "Dr" yeilds no records. I've rearranged it so I could follow the logic easier and came up with this:

    if {?By Salutation} = "ALL" then TRUE 'this selects everyone
    else (if {?By Salutation} = "Dr" then
    {GP27.SALUTATION} = "Dr" or {GP27.SALUTATION} = "Dr(Mrs)" 'this gets the Doctors - men and women
    else {GP27.SALUTATION} = {?By Salutation} 'this catches everyone else

    Second - Are these the only choices for a salutation? Haven't you heard of political correctness? In your case, these few may be acceptable for 99% of the people you'll deal with, but there's always that exception. A doctor can be a man or a woman, married or single. And a nurse can be a man or a woman and not necessarily a member of a religious order. A female doctor or nurse should have the choice to tell her marital status or religious affiliation or conceal it if she prefers.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts