Showing results for 
Search instead for 
Did you mean: 

Bring in a shared field from a sub report

Former Member
0 Kudos

Post Author: Set_Shot_Dave

CA Forum: General

Hello All,

Let me set what I'm doing first.

I have a running total on my sub-report.

Second I have a running total on my main report.

I have to get a percentage of sub-report running total by main report running total.

I shared the sub-report running total as followed:

formula name @shared1

shared numbervar share1;

share1:= (sub-report running total)

then I created a formula called Calculation just to see what I get.

I did the following


shared numbervar share1;

numbervar calculation;

calculation:= share1 this is where I get 0.00.

But on my sub report running total I get a 309. (which is correct)

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Post Author: PeterLiebich

CA Forum: General

In the formual in the main reqport u need to set the EvaluationTime To WhilePrintingRecords - the reason that the formula is displaying zero is becuase it is evaluated once per report, (before the sub -report is executed) . This is because there are no databases fields etc.

ie you formula should be (crsytal syntax)


shared numbervar share1;


(Basic Syntax)


shared share1 as number

formula = share1

Former Member
0 Kudos

Post Author: Charliy

CA Forum: General

In your subreport: SHARED NUMBERVAR answer:= {#runningtotal} ( a little hard to see, that's a colon followed by equal)

In your main report - in a section that runs after the subreport does: SHARED NUMBERVAR answer