I'm having a problem getting shared variables to work in Crystal 9.0. Can a shared variable be declared in a subreport and passed to the main report? Also, how do I match it record for record. For example, I want each record in the subreport to pass a value to each record in the main report. What I get though is the last value from the subreport being passed to every record in the main report. Neither of my reports have groups, but I've tried inserting groups. I'm putting the subreport before the main report. So far, nothing I've tried works. Also, can the value of my shared variable be conditional? Ex.
Shared numberVar myVar;
if(count < 10) then
Shared numberVar := 10
else if(count < 20) then
Shared numberVar := 20
Is this correct?
Shared numberVar myVar;
if(count < 10) then
Shared numberVar := 10
else if(count < 20) then
Shared numberVar := 20
Is this correct?