Friday, March 23, 2012

multiple formulas when suppressing a detail section

I have a report, details a and details b. i need details b to show when a series of formulas are met.

I am having trouble getting this to work:

{loan_main.datepurchased} <> {?Date Purchased} AND not ({loan_query.reivname} like "*wells*")

AND is not performing an AND...

help me please.

thank you :confused::eek: 'AND is not performing an AND...' ?

As you said, you want to show the records when

{loan_main.datepurchased} <> {?Date Purchased} AND not ({loan_query.reivname} like "*wells*")

Right?

I've created a similar formula and it works but in the apposit way: the records which met such a condition are suppressed.
So...... if you want to show those records may be you will change your formula like that:

{loan_main.datepurchased} = {?Date Purchased} AND {loan_query.reivname} like "*wells*" //?

...or correct me if I understood something wrong, please.|||You are correct. I need to show records that meet the criteria, thus i am suppressing records that are on either side.

so, i need to suppress all records

{loan_main.datepurchased} <> {?Date Purchased} AND not ({loan_query.reivname} like "*wells*")

so i would get all loans that are purchased on the date entered upon running the report AND all loans that reivname like wells...

i hope this makes sense.

i am suppressing all the records that do not meet the daily criteria.

thank you|||I've understood what you've written to mean that you want the records with a purchase date of ?DatePurchased, (note the comma) and you want names like wells. i.e. the date is irrelevant for 'wells'.
If so, you want an OR, not an AND.

I find it's easier to write the formula for what records you actually want, and then NOT the whole thing for the suppression formula. e.g.
not( <what you want> )|||I appreciate all help i can get ;)

is it possible to select only the records i want for one section? detail section A is working great, i am having this problem when working with detail section B.

If i can only select records for details section B, i am set...

if not, then besides having two reports, this is it... i think...

i have tried the OR. I need all records that are LIKE 'wells' and date selected is the date purchased.

any help and all help is appreciated.
thank you|||I'm afraid it's still not clear (to me!).

"so i would get all loans that are purchased on the date entered upon running the report AND all loans that reivname like wells..."
The stress on the AND implies to me that you want the union of two sets of data:
1) date entered
2) like wells
i.e. the date is irrelevant for the wells' records, get them all regardless of their date. For non-wells records, base it on the date.

But "I need all records that are LIKE 'wells' and date selected is the date purchased." implies to me that you want
1) date entered and like wells
i.e. only records which satisfy both criteria at once, being wells records for that date.

So which is it?

Maybe you could start at the beginning for us to understand better. e.g. what's in your record selection formula, what you want in detailsA, what you want in detailsB, and whether one record can appear in both detail sections or if they are mutually exclusive.
If mutually exclusive the suppression formulas would be almost the same, e.g. one would be "<formula>" while the other would be "not(<formula>)".|||yes, sorry for the confusion - this report confused me in the beginning too...

I need all records that fit both criteria, datepurchased and like wells.

not one or the other, has to be the date and like wells...

that is why i am trying to use the AND.

hope this makes sense.

thank you...

details A has no formula attached, it shows all records.

thank you|||So I think we've decided that the records you want to show in detailsB are the ones that match both criteria at once :)
The ones you want are therefore:
{loan_main.datepurchased} = {?Date Purchased} AND {loan_query.reivname} like "*wells*"

So the suppression formula is:
NOT (
{loan_main.datepurchased} = {?Date Purchased} AND {loan_query.reivname} like "*wells*"
)

And as someone suggested in a different forum, can either of these fields be NULL?
Also, could 'wells' actually be 'Wells' or 'WELLS' etc.?|||Thank you sooooo much. it worked... :)

i appreciate your help and patience.

thank you sooo much again. it means a lot for the help...|||Glad we got there!

And the reason I always use not(<what I want>) for suppression is because trying to work out the inverse yourself is messy.
e.g. your requirement was effectively "a=x AND b like y"
I believe the logical inverse of that is
not(A<>x OR not(b like y))
which is nearly what you started with, but is nowhere near as easy to understand as what you ended up with.|||I agree. I havent really worked much with crystal, so it is still a learning curve for me... i will deffo use the way you suggested for any future reports.

thank you

No comments:

Post a Comment