Skip to Content

Why aren't my shared variables showing up in the main report?

I have two subreports each containing a cross tab. I want to take the variables from the subreport crosstab totals and add them to the main report totals.

These are the formulas I'm using for the shared variables:

WhilePrintingRecords;

Shared NumberVar col_total := Sum({@UNITSC});

col_total

and

WhilePrintingRecords;

Shared NumberVar fam_total := Sum({@UNITSF});

fam_total

Both cross tabs are placed in the ReportFooter on their respective reports while the shared variable is placed in ReportFooter B. The shared variables show up in their respective reports but when I run the main reports they are missing from the subreports while the crosstabs are still present.

I've also attempted running a formula in the main report and placing that in a report footer of it's own but it only shows a zero number.

This is the formula I used (I ran it with just col_total just to see if I could get it functioning)

WhilePrintingRecords;

Shared NumberVar col_total;

col_total

What I am doing wrong? Why won't my shared variables show up? Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 29, 2015 at 07:28 PM

    Hi Kurt,

    For the shared variables to show values on the Main Report, it needs to be placed in a section below the section that holds the subreport.

    So, if the subreport is on Report Footer A of the Main Report, the shared variable formula to display the result has to be Report Footer B or further down.

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded