0
votes

I'm working in Crystal Reports trying to access certain address information from a subreport. I have a list of client reports in the main report, and in the subreport I have a bunch of mailing labels. I need to grab a certain mailing label for each client report. So far I've managed to share a field between the two, but it always returns the first report in the subreport.

I.E. Client 10's report needs to have the mailing label for client 10, not for client 1.

Thanks for any help in advance!

1
Is there any reason you can't include the address fields in the main report's data source instead of trying to share fields with a subreport?dotjoe

1 Answers

0
votes

I'm guessing that you created a formula and put it in a group header.

Create a formula like this and place it in the detail section.

whileprintingrecords;
shared stringvar x;
if <this is the label I need> x := {LABEL};

EDIT If you always want the final mailing label in the subreport, just use this simpler formula. Any non-suppressed detail section or footer section should do the trick. The formula will be evaluated in each section that references it; the final evaluation is the only one that you really care about.

whileprintingrecords;
shared stringvar x := {LABEL};