Link to home
Start Free TrialLog in
Avatar of Taras
TarasFlag for Canada

asked on

Passing value between sub report and Main report

In sub report I have accumulating formula in detail line with shared variable, I concatenate  values from this field and then I want to  pass that value in main report . When I check value of formula on detail line is showing right value.
But when I pass shared variable in main report it show last value from sub report detail line twice?
(Sub report is running in main report in section above where shared variable is used.)
I assume that is something with re setting shared variable but not sure I tried to re set it in sub report Header the same, in sub report GH2 not good It show empty in main report.


I have two grouping in Sub report  G1 Student ID  this is connecting field between Main and sub report.
Next Group is Activity Type and then detail line.

So I have something like this.

RH
GH1(StudentID)-----
WhilePrintingRecords;
Shared StringVar DescAcum:="";

GH2(ActivityType)
DL-Here is formula------
WhilePrintingRecords;
Shared StringVar DescAcum;
If {tableA.ActivityType} = "Soccer"  And  {?Semester} = "1" And Month ({TableA.Dateto})= 1.00 then
DescAcum:= DescAcum + {TableA.Description} + ";  ";
ASKER CERTIFIED SOLUTION
Avatar of James0628
James0628

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mike McCracken
Mike McCracken

I am not sure what your issue is.

Can you provide a screen shot or a sample?

If your subreport has multiple records you will get several descriptions concatenated.

mlmcc
Avatar of Taras

ASKER

thanks a lot.
If you've fixed the problem, can you tell us what the fix was?  It might help someone else, but, aside from that, I'm just curious.

 James