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

Pulling out one record between dates

Status
Not open for further replies.

T1na

MIS
Oct 28, 2003
15
GB
Having problems getting the results that I need can anyone help?

I have got a School attendance report which runs between dates. Between the dates I want the School history pulling out for the School that has been selected. It seems to work for all students apart from the ones that have been at the School twice. For example:

Start Date End Date
1. Wise Owls 01/01/2010
2. Seaton Primary 03/09/2009 20/12/2009
3. Wise Owls 02/09/2008 20/07/2009

If I run the report from 01/02/2010 I would like record 1 to be shown but the results that I am getting is Start date 01/01/2010 (record 1) and end date 20/07/2009 (record 3).
 
What is your current record selection formula? Do you always want to show the most recent record? What is the name of your Wise Owls field?

-LB
 
When running the report I will select the Base via a parameter {Base_Name). I then want the most recent record for that base.

I can get the correct start date to pull out using north largest but can not get the correct end date.
 
Try grouping by school, maybe suppress the detail lines and show the result in the group footer or header.

You can also use Minimum or Maximum to get a suitable value within a group. Or sort by date within the group.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
Thank you. I have tried this, I am getting the correct start date but the end date is showing 20/07/2009 which is from the wrong record (record 3). The record that I require is blank (record 1).
 
Insert a group on {table.basename} and then go to report->selection formula->GROUP and enter:

{table.startdate} = maximum({table.startdate},{table.basename})

-LB
 
Thank you for your help, my report is now working.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top