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!

Date Range Group

Status
Not open for further replies.

Ox73

IS-IT--Management
Nov 5, 2004
16
I have a crystal report grouped by address and showing the distinct count date. I'm looking to validate that date and only have it show me any specific addresses and dates where the dates are 7 days appart from each other. Any address that has dates less than that I don't care about. For example:

(the distinct count is weeding out same date visit so it only shows the one date for that day)

123 Main St.
01-02-05
01-20-05
Show me this address

456 Elm St.
01-02-05
01-06-05
Don't show me this address
 
For the group, use 'summary totals' to get the maximum date, and then the minimum date. (Right-click on a field and choose Insert to get a choice of Running Total, Summary and Grand Total.)

From the menu, choose Report>Selection Formulas>Group to include just those groups where the two dates are at least 7 days apart. Subtracting one from the other and checking the result should work, with days being assumed for dates unless you say something else.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top