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

Date Ranges for Birthday List - How?

Status
Not open for further replies.

Drakhan

Technical User
Jun 3, 2002
67
US
How does one create a report that uses a date range to display data. I have to create a Birthday report which has a date parameter. Here is an example: 2/12/2003 - 3/12/2003 (the dates are arbitrary...they could be anything). The data fields in the table are strange, here are the table/field names:

Table1.Birthday1
Table1.Birthday2
Table1.Birthday3
Table1.Birthday4

Table1.Name1
Table1.Name2
Table1.Name3
Table1.Name4

How do I create a report that simply generates output like:

Name Birthday
Table1.Name1 Table1.Birthday1
Table1.Name2 Table1.Birthday2
Table1.Name3 Table1.Birthday3
Table1.Name4 Table1.Birthday4

Which is based on the parameter field only...that is, I only want the Table1.NameX and Table1.BirthdayX values to show if they fall within the date range, if they do not - I do not want to see anything. Thanks!
 
Create a range type date parameter.

In the Record Selection Formula place something like the following:

{table1.birthday1} in {?dateparm}
or
...

Repeat it for all of the birthdays and this will limit rows to only rows with at least one birthday that qualifies.

Create 3 additional details sections (right click the details and select insert section below)

Placec a name and bday field in each section

In the suppress of each section, place a formula appropriate to the field displayed, as in:

not({table1.birthday1} in {?dateparm})

-k

kai@informeddatadecisions.com
 
Thanks for the suggestions. I believe will help me get on the right track. Specifically, I am interested in pulling dates based on the {?dateparm} and compare that with historical dates.

Let's say the {?dateparm} range is 02/1/2003 to 02/28/2003. The TABLE1.BIRTHDAY1 data contains 02/13/1969 or 02/02/2001 or 02/28/1999 or 02/14/1929...for whatever reason, Crystal doesn't think these values are not in the {?dateparm} range...
 
Hey Drakhan,

Your date fields are really string fields on the database, aren't they? They look like they haven't been converted to dates, which is why Crystal thinks 02/13/1969 is between 02/1/2003 and 02/28/2003 - which, if they were string, would be correct.

Convert your strings in your selection criteria, using Date(YourField) in Date(YourParms)

Naith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top