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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Summary or running total could not be created

Status
Not open for further replies.

craigK

MIS
Mar 28, 2001
71
US
Hi,

I have a formula field in the main report which gets data from a shared variable of a subreport. How do i get a summary value of this formula field in the main report to work.
When i tried i got an error as below
"Summary or running total could not be created"

Subreport formula name: sFedFUTA

whileprintingrecords;
shared numbervar FedFUTA := {UPR40100.FUSUWLMT}


Main Report formula name: sFEDFUTA

whileprintingrecords;
shared numbervar FedFUTA;
FedFUTA ;

formula name: FUTAWages

if {@GrossWages} < {@sFEDFUTA} then
{@GrossWages} else
{@sFEDFUTA}

formula name: FUTAWagesTotal
sum({@FUTAWages})

When i try to use the sum function it get &quot;Summary or running total could not be created&quot;

What's Wrong....

Please help
 
I've had a similar problem before, though in my case the variables were all within one Main report. Below is the logic I used to solve it. Hopefully it'll work with the variable coming from the subreport...


In the group header, create the 2nd variable and initialize it to 0:

Formula vRunningTtl:

Whileprintingrecords;
Shared numbervar RunningTtl:=0;

Then in modify your IF...THEN logic:

formula name: FUTAWages

WhilePrintingRecords;
Shared NumberVar CurrentTtl:=(
if {@GrossWages} < Shared NumberVar FEDFUTA then
{@GrossWages} else
Shared CurrencyVar FEDFUTA);
Shared NumberVar RunningTtl := RunningTtl + CurrentTtl;

Then in your group footer (or wherever you want the total):

WhilePrintingRecords;
Shared NumberVar RunningTtl;
RunningTtl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top