cancel
Showing results for 
Search instead for 
Did you mean: 

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

former_member279138
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor

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

former_member279138
Participant
0 Kudos

Every shared variable I have is placed in a section below

abhilash_kumar
Active Contributor
0 Kudos

Not that I don't believe you however, do you have a screenshot of the Subreport's design page and the Main Report's design?

-Abhilash

former_member279138
Participant
0 Kudos

I realized what I was doing wrong. I added the formulas to the original reports. Not to the subreports versions of the reports attached to the main report.

Answers (0)