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

Summing and selecting shared numbervar

Status
Not open for further replies.

Deano1976

Technical User
Dec 16, 2004
41
GB
CR V8.5

I have a report which contains a subreport. The main report has a (very simple) shared value from the sub report in it. Let's call it: @mainformula

Code:
whileprintingrecords;
shared numbervar historycount;
historycount

I then add this value (above) to another value (@waitinglistsum) that has only been calculated in the main report.
This resulting field is called @sum.

How can I now count, sum and/or select on this field (@sum)?
 
You can't create summaries on formulas which contain or rely on other formulas which contain shared variables.

This is because of CR's Evalutaion time model


You will need to create further formulas to create your own summries

i.e.
To sum your historycount variable you might change your @mainformula to

Code:
whileprintingrecords;
shared numbervar historycount;
shared numbervar SumHistory := SumHistory + historycount;

then create a 2nd formula to display the results in the group or report footer section

Code:
whileprintingrecords;
shared numbervar SumHistory;

HTH



Gary Parker
MIS Data Analyst
Manchester, England
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top