Skip to Content
0
Former Member
Oct 23, 2013 at 12:47 PM

Shared NumberVars and Subreports

18 Views

Hi,

I was wondering if anyone can help me with an issue I'm having with one of my reports.

I have a main report with four subreports within it.

On my fourth subreport I wish to summate a total from values of a tag that are in the previous three reports...

I created this formula and put it in each subreport:

In Subreport 1:

Whileprintingrecords;

Shared Numbervar val1;

val1:={Tags.Cost}

In Subreport 2:

Whileprintingrecords;

Shared Numbervar val2;

val2:={Tags.Cost}

In Subreport 3:

Whileprintingrecords;

Shared Numbervar val3;

val3:={Tags.Cost}

Then in the final subreport, is where I want to show my total of all these three numbers, so I have this formula:

Whileprintingrecords;

Numbervar tot;

Shared Numbervar val1;

Shared Numbervar val2;

Shared Numbervar val3;

Tot:=val1+val2+val3;

But for some reason, it always misses out Val1, and the Total I get is only the Val2 + Val3?

Can anyone help?

Many thanks,

Cal