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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to suppress a section based on two different criteria 1

Status
Not open for further replies.

wishiknewmore

Technical User
Feb 27, 2002
39
US
I have a report that returns all invoices dated 1 Jan 2006 and later. We want to show only those customers with total 2006 sales within a certain range and also the last year to date and this year to date sales. Kind of a "how goes it" report.
I'm showing running totals in a section footer. I want to suppress the section for any entries outside the parameters shown. My problem is: the report gives a null value for the running total if there were any invoices within the current year, but none in 2006.

I've tried to format the footer to suppress the section based on the following formula, but it doesn't work. As written, it only suppresses based on the first part of the formula (the range of the running total) but does not suppress based on the second part of the formula (null fields). If I reverse the two parts of the formula, it then suppresses all lines where the field is null, but does not suppress the section when the running total is out of range.

What am I doing wrong, or better yet, how can I achieve my goal. Here is the current formula:


If(({#RT Sales for 2006} < 10000.00) or ({#RT Sales for 2006}>=49999.99)) then true

else if (isnull ({#RT Sales for 2006}))
then true

else false

 
Always make your test for Nulls the first test in the formula i.e.

(IsNull({#RT Sales for 2006}) Or
{#RT Sales for 2006} < 10000.00 Or
{#RT Sales for 2006} >= 49999.99)

HTH

Gary Parker
MIS Data Analyst
Manchester, England
 
Thanks Gary,

Worked like a charm.

Ron

PS: I'm in Albuquerque, NM, but my wife is a Brit from Lancashire. Have a pint on me.

 
Glad to help Ron

I think there's a glass or 3 of Boddingtons with my name on it for tonight.

Gary Parker
MIS Data Analyst
Manchester, England
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top