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!

Linking subreport on Specified Group

Status
Not open for further replies.

LOgden

MIS
Aug 21, 2002
4
US
I created age groups based on a date-of-birth field using Specified Groups in Crystal 8.0.

I wanted to include a subreport for each of these age groups. I created the same groupings in the subreport and linked it by the Date of Birth field.

The resulting subreport runs with just the last person on the list from the main report showing in the subreport. Each subreport under each group just has this one person even though the main report has many people in each group.

I tried fixing this in every other way, but can not find anything wrong otherwise, so I wonder if the problem is that the Specified Group functionality doesn't carry over correctly to the subreport. Is this the problem, do you think?

Thanks, Lucy Ogden
 
Check the subreport Report->Edit selection formula->Record to see what is getting passed as the link. This can be manually edited.

Another means to do this would be to create a formula to group on, such as:

If datadd("y",{table.dob}) < 5 then
"Group 1"
else
If datadd("y",{table.dob}) < 10 then
"Group 2"
else
"Group 3"

You might be better served to supply technical information about the requirement as it's generally best to avoid subreports.

Crystal version
Database/connectivity
Example data
Expected output

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top