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

need to exclude all records based on formula

Status
Not open for further replies.

atarrqis

IS-IT--Management
Nov 26, 2004
155
US
CR 8.5 and Oracle
I have a report that pulls in all parts, one part per page and then lists each delivery
line so Group1 = part and Group2 = delivery date. I need to exclude the page completely if no
delivery date is within 90 days, else include all delivery dates. I already have subreports for
other reasons at the detail level so I cannot use a subreport to get around this. The report is
large so I'd really like to exclude the data during selection but cannot figure out how.
(I have never used Group selection, only Record.)

I have set variables - (all WhilePrintingRecords)
reset_count_within := 0 - in page header
within := If delivery date <= today +90 then 1 - in detail
count_within := count_within + @within - in page footer
These all display as I expect. However, when I try and use these to format every section as
"suppress when count_within <1" everything is perfect except I cannot avoid printing Group1 HeaderA
which is just the text that appears at the top of each page for those pages that should be suppressed.
(Group1 HeaderA is text, HeaderB is the part #, description, etc.)

What am I missing or is there a better way? Thanks.
 
Hi,
Group selection is very much like Record selection except it can use certain summary fields as part of the criteria..

But, why not just have

delivery date <= (today +90)

in your record selection formula..



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Sorry I wasn't clear...
Because for one part I might have delivery dates of
12/1/2005
2/1/2006
4/1/2006
I don't want to exclude any records because at least one of the lines is within 90 days.

If for one part I have
4/1/2006
6/1/2006 then I would want to exclude this part completely
becuase no line is within 90 days.
 
Use a formula like this {@datediff} in the detail section:

if datediff("d",{table.date},currentdate) <= 90 then 1

Then go to report->selection formula->GROUP and enter:

sum({@datediff},{table.partno}) > 0

-LB
 
Excellent, LB. I had to flip the date relative to currentdate but works like a charm.
Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top