cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Data being returned from Subreport to Mainreport

jopav613
Explorer
0 Kudos

I created a Crystal Report that has in it an embedded subreport. I created a parameter field in the Mainreport that is pointing to an item# field. I then link this parameter to a similar item# field in the subreport. I created a shared variable on both sub and main and put the shared variable into my mainreport. When I put in to the parameter on the main just one item # everything goes perfectly. Once I put in more than one item# this is what happens:

The subreport area of my main, the sub returns both item#s' info just fine, HOWEVER the shared value on my main is only returning the data of the second item and using that same data for the second item (or more items, if I send over more) as well. so my main report seems to not be relating the data correctly that it just got from the sub. Very frustrating.


Would really appreciate help here!

Thanks.

vitaly_izmaylov
Employee
Employee
0 Kudos

According to Joe, problem solved

Accepted Solutions (0)

Answers (1)

Answers (1)

DellSC
Active Contributor
0 Kudos

Variables that are shared between the main report and a subreport will only return a single value to the main report - the last value the variable has in the sub report. There is no easy way to push data from multiple records in a subreport up to the main report.

If you'll explain a little more about what you're trying to return from the subreport, I may be able to come up with a way to accomplish it (no guarantees, though).

-Dell

jopav613
Explorer
0 Kudos

Hi Dell,

It turns out my mistake was that in the subrep links I was linking the parameter to the field in the subreport, whereas I should've been linking the main report field the parameter in my main report was referring to, in my main report, instead and then it worked. Thanks!