cancel
Showing results for 
Search instead for 
Did you mean: 

Shared Variable from Details Section in Subreport to Details Section in Main Report

Former Member
0 Kudos

Hi,

I am able to grab the Details in a Sub Report to the Details in the Main Report. The field is called CommRate. On the Main Report, it shows up correctly in the Details section. Everything looks good, but how can I use that field in a calculation in the Details section in the Main Report?

I watched some videos relating to Shared Variables so am trying this:

I created a field called CommRate with the following formula:
WhilePrintingRecords;
Shared NumberVar CommRate := {@CommissionRateSub};

On the Main Report, I have the formula called CommissionRate with the following forumula:
WhilePrintingRecords;
Shared NumberVar CommRate;
CommRate

I am trying to get the CommissionRate to show up on the Main Report in the Details section so I could use it as a calculation. Right now, it shows zero with these formulas I created.

Any help would be appreciated.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I would start by printing @CommissionRateSub in the subreport to confirm its value before assigning it to CommRate (ie. ensure it is not indeed zero).

If CommRate has whileprintingrecords, then I would also add whileprintingrecords; to the beginning of @CommissionRateSub formula.