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!

group select problem

Status
Not open for further replies.

mwhalen

Programmer
Oct 31, 2000
217
CA
Hi. I have an address table that I'm using in a subreport. I want the most recent address for the customer id and so I do a group select. The problem is say I have about 5 different addresses for each customer - some might be inactive addresses and some might be active (address status = A or I). As it turns out, I am getting the most recent address but in some cases the most recent address is inactive. As well I do have in my record selection criteria where address status = A. It's almost as if the group select runs separate from the record select. Is the only way around this to hard code the sql in my sub report?

Thanks!
 
Please post both formulas. Also, why do you have a subreport, and please explain your subreport linking. Software Training and Support for Macola, Crystal Reports and Goldmine
251-621-8972
dgilsdorf@mchsi.com
 
I'm not sure why it matters if I have a subreport. I have client id's and then I have to drop different information pertaining to each client id such as address, phone, financials. Our addresses, phones, financials are all in separate tables because of the volume of our database. Here is the record selection in my addresses table:
{PREF_ADDR.ID}={?Pm-PERS_DATA.ID}and{ADDRESSES.STATUS} = "A"

and here is my grouping formula:
{ADDRESSES.EFFDT} = Maximum({ADDRESSES.EFFDT},{PREF_ADDR.ID})

thanks for you time!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top