Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Weird problem with shared variable from subreport to main

Status
Not open for further replies.

Malekish

Technical User
Dec 8, 2008
36
US
Ok. This has me crazy. I'm sharing a value from subreport to main report and it's doing something odd. I've tried a dozen different troubleshooting steps and have stripped everything down to the basics to see what is going wrong. Here's the final troubleshooting steps I'm at.

Code:
// Subreport SAT
whileprintingrecords;
shared numbervar SATTotalCalls;
SATTotalCalls := {#RunTotCalls};

// Main Report, located lower than subreport
// I use the total calls from San Antonio in several places
// So I define it as a variable in the main report
// San Antonio Total Calls
whileprintingrecords;
shared numbervar SATTotalCalls;

I drop {@San Antonio Total Calls} in the main report and I get the correct value.

I have a formula that I wrote

Code:
// test total calls across all locations
whileprintingrecores;
{@SATTotalCalls} + {#TotalCalls}

As soon as I drop that formula on the report (again, lower than the subreport) not only does it not total up correctly but {@SATTotalCalls} immediately goes to 0.

??? What the heck? What am I missing?





 
That was weird as heck. I deleted and re-wrote all the formulae in the main report and it's working now. Grrr!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top