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

Link Subreport by GroupName 1

Status
Not open for further replies.

redsand23

Technical User
Feb 22, 2002
77
US
I am using CR 9 with access. I have a report grouped by date(It is set up to print by week.) I also have a subreport that is a separate table that is also grouped and set up to print by week. When I report the group name I always get the first day of the week on both reports.

The problem I am having is linking these 2 reports. I want to take the 2nd report and link to the 1st report by the group name(first day of the week) but I can not find how to do this.

Any help would be greatly appreciated.
 
Link the subreport to the main report on the datefield itself. If you want the subreport to appear once per group, then place it in the group header or group footer.

-LB
 
The problem with using the actual date field is that I have multiple dates on the table and I am summarizing the subreport by week in the date footing.

So the subreport group field says 4/25/04 (First day of the week) That is the field I want to link to, but If I report the actual date it reports the last day of the week or the last record that falls within that week.
I probably am not making any sense.....


I just want to link the group field(The first day of the week, to the group field of the main report.

Thanks!!!
 
Okay, I see the issue. I think you could get the result you want by using week numbers. If your dates all fall within the same calendar year, you could create a formula {@weekno} in both the main report and subreport:

datepart("ww",{table.date})

Then link the subreport to the main report on this formula.

If the dates cross calendar years, then change the formula to:

totext(datepart("ww",{table.date}),"00")+" "+
totext(year({table.date}),0,"")

Then use this formula as the link.

In either case, you do not have to change your original group. Just use the formulas for linking.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top